Re: Sorting out letters from numbers in a field
Posted: Tue Apr 08, 2025 3:28 pm
Yes, unfortunately LiveCode does not have an isAlphabetic to strain out the %$#( type chars.
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Code: Select all
function isAlpha var
if var is in "abcdefghijklmnopqrstuvwxyz" then return "true" else return "false"
end isAlphaIf 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.dunbarx wrote: Mon Apr 07, 2025 3:56 pm The problem with the OP's original post is that he is trying to ascribe that function to an element of field text as if it was a property of that element of text. That dog don't hunt.
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
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 isAlphaWhy 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