Character escape codes: Difference between revisions
From Zenitel Wiki
No edit summary |
No edit summary |
||
| Line 44: | Line 44: | ||
|} | |} | ||
Example: | Example: CR (Carriage Return) can be generated by one of the following escape sequence: | ||
\r | \r | ||
%r | |||
\x0D | |||
Revision as of 22:03, 31 March 2008
Escape sequences use an escape character to change the meaning of the characters which follow it. In the event handler backslash (\) or percent (%) is used as escape character.
| Char | Code | Alt. code | Hex | Description |
|---|---|---|---|---|
| , | %, | %c | 2C | Comma |
| ( | %( | %o | 28 | Opening parenthese |
| ) | %) | %p | 29 | Closing parenthese |
| " | %" | %d | 22 | Double quote |
| ; | %; | %e | 3B | Semicolon |
| \ | %\ | 5C | Backslash | |
| % | %% | 25 | Percent | |
| TAB | %t | 09 | ASCII TAB (Horisontal tab) | |
| SP | %s | 20 | Space | |
| CR | %r | 0D | Carriage return | |
| LF | %n | 0A | Line feed | |
| BEL | %a | 07 | Bell (Alert) | |
| BS | %b | 08 | Backspace | |
| NUL | %0 | 00 | ASCII NUL | |
| %xhh | %#hh | 'hh' is the character code as 2 hex digits. Note that you must use 2 digits. | ||
| %l | 80 | Extended NUL ('\x80') | ||
| %q | to quote next character in string (if not parameter or end of string) |
Example: CR (Carriage Return) can be generated by one of the following escape sequence:
\r %r \x0D
