In Progress 4GL the normal way to write a special character is to preceed it with a tilde character (~).
These are the default special characters
| Sequence | Interpreted as | Comment |
|---|---|---|
| ~" | " | Used to write " inside strings defined using "string". |
| ~' | ' | Used to write ' inside strings defined using 'string'. |
| ~~ | ~ | For instance if you want to print the sequence and not how its interpreted. |
| ~\ | \ | |
| ~{ | { | { is used in preprocessors and sometimes escaping is needed. |
| ~nnn | A single character | nnn is an octal number representing the ascii value of the character. |
| ~t | tab | |
| ~n | New line/line feed | |
| ~r | Carriage return | |
| ~E | Escape | |
| ~b | Backspace | |
| ~f | Form feed |
If you want to display tilde at all it must be escaped!
MESSAGE "A single tilde: ~~" VIEW-AS ALERT-BOX.
MESSAGE "At sign: ~100" SKIP
"Tab~tseparated~twords!" SKIP
"A linefeed:~n"
"Escaping a quote sign: ~"This is a quote!~"" SKIP VIEW-AS ALERT-BOX.