Oracle iPlanet Web Server 7.0.9 Administrator's Configuration File Reference

Expression Literals

Expression literals are divided into string and numeric literals.

String Literals

A string literal is bracketed by either single quotes (') or double quotes ("). When single quotes bracket a string literal, the value of the literal is the value within the quotes. When double quotes are used, any references to variables or expressions within the quotes are interpolated. For more information, see String Interpolation.

The following expression examples show the use of single and double quotes.

# This expression evaluates to true
('foo' eq "foo")

# This expression evaluates to false
('foo' eq "bar")

# This expression evaluates to true
('foo' eq "f$(lc('O'))o")

# This expression may evaluate to true or false,
# depending on the value of the variable $foo
('$foo' eq "$foo")

To include an uninterpolated $ character in a double quote string, use the $$ or \$ escape sequences.

When a double quote character appears within a literal bracketed by double quotes, it must be prefixed with a backslash. When a single backslash (\) character appears within a literal bracketed by double quotes, it must be prefixed with a backslash. When a single quote character appears within a literal bracketed by single quotes, it must be prefixed with a backslash.

The following examples show valid and invalid literals:

# The following are examples of valid literals
'this string literal is bracketed by single quotes'
"this string literal is bracketed by double quotes"
"the backslash, \\, escapes characters in double quote string literals"
'it\'s easy to use strings literals'

# The following are examples of invalid literals
'it's important to escape quote characters'
"any \ characters in double quote string literals must be escaped"

Numeric Literals

A numeric literal can consist of decimal digits and an optional decimal point, a leading zero followed by octal digits, or a leading 0x prefix followed by hexadecimal digits. Hexadecimal and octal numbers are automatically converted to decimal form.

The following examples show expressions that use numeric literals:

# The following expressions evaluate to true
(1 < 2)
(0x10 == "16")
(1 == 1.00)

# The following expressions evaluate to false
(1 > 2)
("0x10" == 16)
(1 != 1.00)