Sorting out letters from numbers in a field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Sorting out letters from numbers in a field
Yes, unfortunately LiveCode does not have an isAlphabetic to strain out the %$#( type chars.
Last edited by richmond62 on Wed Apr 09, 2025 2:45 pm, edited 1 time in total.
Re: Sorting out letters from numbers in a field
Richmond,
True, though if one does this all day, make a function and load it into a plugin.
Craig
True, though if one does this all day, make a function and load it into a plugin.
Code: Select all
function isAlpha var
if var is in "abcdefghijklmnopqrstuvwxyz" then return "true" else return "false"
end isAlpha
Last edited by dunbarx on Tue Apr 08, 2025 4:02 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Sorting out letters from numbers in a field
If I could go back in time and change any one decision made by the original HyperCard team it would be their bizarre choice to allow property syntax ("of") when calling single-param functions.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Sorting out letters from numbers in a field
Richard.
I would be happy to go with you.
I assume it was during the time of making HyperTalk as friendly as possible, and the more "conversational" option of using the word "of" seemed appropriate. Bill Atkinson believed that everybody would be making personalized rolodexes with cute black and white figurines. Dan Winkler all the while was plugging away at hyperTalk. Bill was astounded when a couple hundred thousand people started demanding detailed information about writing scripts and everything they could get their hands on about HT. Bill underestimated the public's appetite for writing code, that is, the appetite to make bigger things than a rolodex.
Craig
I would be happy to go with you.
I assume it was during the time of making HyperTalk as friendly as possible, and the more "conversational" option of using the word "of" seemed appropriate. Bill Atkinson believed that everybody would be making personalized rolodexes with cute black and white figurines. Dan Winkler all the while was plugging away at hyperTalk. Bill was astounded when a couple hundred thousand people started demanding detailed information about writing scripts and everything they could get their hands on about HT. Bill underestimated the public's appetite for writing code, that is, the appetite to make bigger things than a rolodex.
Craig
-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Sorting out letters from numbers in a field
You'd have a hell of a job writing a plugin that listed every alphabetic symbol listed by the Unicode consortium.make a function and load it into a plugin

Re: Sorting out letters from numbers in a field
Richmond.
No, I don't do that sort of thing. But you might.
And so, looking at my plug-in, would it be so onerous to create a giant switch statement, with each language in a one-line case statement:
Craig
No, I don't do that sort of thing. But you might.
And so, looking at my plug-in, would it be so onerous to create a giant switch statement, with each language in a one-line case statement:
Code: Select all
function isAlpha var,language
switch language
case "English"
if var is in "abcdefghijklmnopqrstuvwxyz" then return "true" else return "false"
break
case "Bulgarian"
if var is in ...
break
...
end isAlpha
-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Sorting out letters from numbers in a field
I wonder how you would differentiate between languages that used the same alphabet?
Re: Sorting out letters from numbers in a field
Richmond.
The Greeks have only 24 letters in their alphabet, so they need their own character set.
Craig
Why would you have to? All that function does is validate a certain character set. The French use the same set we do, so ""French" would just be another case statement:I wonder how you would differentiate between languages that used the same alphabet?
Code: Select all
function isAlpha var,language
switch language
case "English"
case "French"
if var is in "abcdefghijklmnopqrstuvwxyz" then return "true" else return "false"
break
case "Bulgarian"
if var is in ...
break
...
end isAlpha
Craig