{"identifier":52559,"topic":"Functions","name":"charToNum","text":"<code><pre>the charToNum of <i>char<\/i>\n<\/pre><\/code>\nValue returned: positive integer equal to the ASCII value of the<code> <i>char<\/i><\/code> <br>\n","related":{"32809":null,"57200":"length","60292":"numToChar","60426":"offset","90270":"String operators"},"examples":"","demo":"on nameUpperCase\n   ask \"Please enter your name:\"\n   if (it is empty) or (the result is \"Cancel\") then exit nameUpperCase\n   answer uppercase(it)\n end nameUpperCase\n <br><br>\n\n function upperCase whatStr\n   repeat with charNum = 1 to the number of chars in whatStr\n     put <b>charToNum<\/b>(char charNum of whatStr) into thisChar\n     if thisChar \u2265 97 AND thisChar \u2264 122\n     then put numToChar(thisChar - 32) into char charNum of whatStr\n   end repeat\n   return whatStr\n end upperCase\n <br><br>\n\n ","debug":{"9":["the charToNum of cha"]}}