Top  Previous  Next

Literals (or constants) are invariant elements of the script. They fall into three major categories: integer, floating and string literals.
Integer literals are constant data elements that have no fractional parts or exponents. They can be decimal positive whole numbers, decimal negative whole numbers, and zero. The following are examples of integer literals:  


Floating-point literals specify values that must have a fractional part. These values contain decimal point and can contain exponents. Floating-point constants have a "mantissa," which specifies the value of the number, an "exponent," which specifies the magnitude of the number. The mantissa is specified as a sequence of digits followed by a period, followed by an optional sequence of digits representing the fractional part of the number. For example:  
The exponent, if present, specifies the magnitude of the number as a power of 10, as shown in the following example:  
17.43e0 // 17.43  
17.43e1 // 174.3.  
If an exponent is present, the trailing decimal point is unnecessary in whole numbers such as 17E0.  


A string literal is a chain ASCII characters (letters, digits, and punctuation marks) strung together. String literals can be included in the scripts by enclosing them in matching pairs of double quotation marks. There are a few special characters that cannot be typed directly. These characters should be represented with escape sequences starting with a backslash:  
Escape Sequence
Form feed
Line feed (new line)
Carriage return
Horizontal tab (Ctrl-I)
Double quotation mark
The following are examples of strings:  
"ImageWarp is universal image processing, editing, and analysis software"  
"c:\\Program Files\\ImageWarp\\Samples\\sample8.iwd"