Difference between revisions of "Chr"
(Copied user guide content, changed status.) |
m |
||
Line 2: | Line 2: | ||
[[Category:Doc Status C]] <!-- For Lumina use, do not change --> | [[Category:Doc Status C]] <!-- For Lumina use, do not change --> | ||
− | = Chr(n) = | + | === Chr(n) === |
− | Returns the character | + | Returns the character as a text that corresponds to the numerical ASCII code ''n'' (a number between 0 and 255). '''Chr''' and [[Asc]] are inverses of each other, for example: |
− | :Chr(65) → ‘A’, [[Asc]]( | + | :Chr(65) → ‘A’, [[Asc]]('A') → 65 |
− | + | '''Chr''' is useful for creating characters that cannot easily be typed, such as tab, which is Chr(9) and new line or carriage return (CR), which is Chr(13). For example, if you [[ReadTextFile|read in a text file]], x, you can use [[SplitText]](x, Chr(13)) to split the file up at each new line character into an array of lines. | |
− | Chr is useful for creating characters that cannot easily be typed, such as tab, which is Chr(9) and carriage return (CR), which is Chr(13). For example, if you [[ReadTextFile|read in a text file]], x, you can use [[SplitText]](x, Chr(13)) to | ||
− | = | + | === See Also === |
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | = | ||
* [[Asc]] | * [[Asc]] | ||
* [[SplitText]] | * [[SplitText]] |
Revision as of 03:20, 13 November 2015
Chr(n)
Returns the character as a text that corresponds to the numerical ASCII code n (a number between 0 and 255). Chr and Asc are inverses of each other, for example:
- Chr(65) → ‘A’, Asc('A') → 65
Chr is useful for creating characters that cannot easily be typed, such as tab, which is Chr(9) and new line or carriage return (CR), which is Chr(13). For example, if you read in a text file, x, you can use SplitText(x, Chr(13)) to split the file up at each new line character into an array of lines.
See Also
Comments
Enable comment auto-refresher