Category: Character Literals

The Original Internet Language

Character Literals

A character literal is any string of characters enclosed in quotation marks as shown in the following example: ‘This is a character string.’ “This is a character string, too.” For convenience, you can enter character literals without the delimiting quotation marks; however, quotation marks are required in some situations. The rules for using quotation marks…
Read more

The Null String

A null string is a character string of zero length. Unlike the $Null property that indicates that the value is unknown or unassigned, the null string is a known value. For example, if you have two variables, x and y, both of which are null strings, then the expression x = ” and y ‘abc’…
Read more

Metacharacters in Character Literals

Certain characters, such as quotation marks and the backslash, have special functions in the software. If you need to use one of these metacharacters as a literal character in a string, you must “escape” the special function by inserting a backslash ( – Escape) preceding the metacharacter as shown in the following example: ‘This is…
Read more

Hex Codes in Character Literals

If you need a place a character not normally available from the keyboard into a character literal, use the backslash to create the hex code for that character as shown in the following example: ‘This string has an ASCII escape generated by hex 1B (1B)’ The two characters immediately following a quoted backslash are treated…
Read more

About Character Literals

A character literal is any string of characters enclosed in quotation marks as shown in the following example: ‘This is a character string.’ “This is a character string, too.” For convenience, you can enter character literals without the delimiting quotation marks; however, quotation marks are required in some situations. The rules for using quotation marks…
Read more

en_CAEnglish