ASCII is a way text (can be) held in computer. So this is a simple little guide on how to obtain these numbers from a string and how to convert these numbers back into a strings via Monkey code.
To convert a given letter in a string into a ASCII value you can...
Local sName:String="Goosey Flipflop!"
Print sName[0] 'prints 71 for letter G
Print sName[3] 'prints 115 for letter s
To convert a ASCII value back into a string you can..
Local iNum:Int=80
Print String.FromChar(iNum) 'prints "P"
Also of note you can do...
print "something"[3] 'print the ASCII value of 'e'
I am sure this will help someone!
|