Message 1 of 11
Testing a string for alpha characters.

Not applicable
08-27-2009
03:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In max 2009 I am trying to test the characters in the string "RAL" whether they are alpha characters. Using the script below
for a = 1 to "RAL".count do
(
if ((substring "RAL" a 1) as number) == undefined then
(
mesagebox "THIS IS AN ALPHA CHARACTER"
)
else
(
messagebox "THIS IS A NUMBER CHARACTER"
)
)
It works till I get to "L" which doesn't produce undefined but rather 0L. I understand this has to do with bits. Is there a way around this or possibly another solution?
Thanks in advance
for a = 1 to "RAL".count do
(
if ((substring "RAL" a 1) as number) == undefined then
(
mesagebox "THIS IS AN ALPHA CHARACTER"
)
else
(
messagebox "THIS IS A NUMBER CHARACTER"
)
)
It works till I get to "L" which doesn't produce undefined but rather 0L. I understand this has to do with bits. Is there a way around this or possibly another solution?
Thanks in advance