Getting ASCII value from a character

Jeff Shepherd jeff at trg.saic.com
Tue Nov 26 11:33:29 PST 2002


How can I get an ASCII value from a character? An example from 
another language would be ASCII("A") = 65.  Frontier does the reverse 
with char(65) = 'A'. I would think this function would be in the 
coercion verbs, but must have overlooked something.

And in a similar vein, which is the fastest for going though a string?

text = "This is a string"
for i=1 to sizeOf(text)
	text[i]
	string.nthChar(text, i)
	string.mid(text, i, 1)

Perhaps one of the string verbs would be slower but might be safer in 
case of addressing beyond the end of the string. True?

  - Jeff -
-- 
(Jeff Shepherd)            Drink your coffee...
<jeff at trg.saic.com>        There are people asleep in India right now.
<http://www.aShep.com/>



More information about the Frontier-Users mailing list