Error getting tags :
error 404Error getting tags :
error 404 charToNum | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
charToNum
Basics
Expander triangle
Type
Function
Syntax
the charToNum of character charToNum(character)
Introduced
1.0
Changed
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns the ASCII value of a character.
Examples

charToNum("A") -- returns 65
charToNum("ABC") -- also returns 65
if charToNum(nextChar) = 0 then next repeat
numToChar(charToNum("Z")) -- returns Z

Additional Comments
Expander triangle

Use the charToNum function to rank characters in their numerical order.

Parameters:

The character is any character or expression that evaluates to a character. If you specify a string containing more than one character, all characters but the first are ignored.

Value:

The charToNum function returns an integer between zero and 255. If the useUnicode property is set to true, the charToNum function returns an integer between zero and 65535.

Comments:

The charToNum function is the inverse of the numToChar function.

For special characters (those typed using the Option key or Alt key), the value returned by the charToNum function depends on the character set currently in use. On Mac OS systems this is normally the Macintosh character set; on Unix systems, this is normally ISO 8859; on Windows systems, this is usually Code Page 1252, a variant of ISO 8859.

If the useUnicode property is set to true, you can specify a double-byte character. If the useUnicode is false and you specify a double-byte character, the charToNum function returns the numeric value of the character div 256.

Changes to Revolution:

The ability to handle Unicode characters was introduced in version 2.0. In previous versions, it was not possible to pass a Unicode character to the charToNum function.

User Comments
Expander triangle