OpenSTA logo OpenSTA SCL Reference
Character Representation

Character Representation

Within quoted character strings and character variables SCL supports the use of any character with an ASCII value in the range 0x00 to 0xFF inclusive. However, direct specification of these characters is not always possible, for two reasons:

  • Characters with values in the ranges 0x00 to 0x20 and 0x7F to 0xA0, and the value 0xFF, are non-printing characters.
  • Two characters are special to SCL because of the notation used to represent the above - the command character(~) and the control character (^).

The command and control characters can be represented by placing the command character in front of them (~~ and ~^). Other characters can be represented using the command and control characters as follows:

Using ASCII Mnemonic Notation

The commonly used characters have a mnemonic notation giving an easily identifiable representation of control characters. These use the ASCII mnemonic of the control character in question. The following notations are available:

mnemonicmeaninghex.control
~<BEL>Bell0x07^G
~<BS>Backspace0x08^H
~<CR>Carriage return0x0D^M
~<DEL>Delete0x7F
~<ESC>Escape0x1B^[
~<FF>Form feed0x0C^L
~<HT>Horizontal tab0x09^I
~<LF>Line feed0x0A^J
~<VT>Vertical tab0x0B^K

Using Hexadecimal Notation

All characters can be represented by hexadecimal ASCII code, using this syntax:

~<hh>

Where hh is the hexadecimal ASCII code (0xhh) of the required character.

For example, the ASCII horizontal tabulation character is represented by ~<09> and the null character by ~<00>.

Note: As an exception to this notation, ~<FF> represents the form feed character as covered above, so to represent the character with the ASCII code of 255 (0xFF) you must use ~<0FF>.

Using Control Character Notation

All 7-bit control characters, i.e. characters with ASCII codes in the range 0x00 to 0x1F inclusive, may be represented using a control character syntax. This syntax has the following format:

^c

Where c is the control character specifier. The control character specifier is an ASCII graphics character with an ASCII code in the range 0x40 (ASCII @) to 0x5F (ASCII _). The compiler will apply the bottom 6 bits only, to generate an ASCII code in the range 0x00 to 0x1F.

For example, the ASCII bell character (ASCII code 0x07), is represented by ^G.


<<<
prev page
^^^
section start
>>>
next page