Constants

Ordinary Constant values use the syntax shown below:

Field Type Syntax Examples
Boolean

The identifiers listed in the examples.
In simple comparisons of the form field_name=character string if field_name is a boolean field and character string matches the yes or no word for the field, the comparison will be accepted and translated appropriately. (If character string is not recognised there will be a compilation error.)

TRUE
Yes
FALSE
No
Character

Use single ' or " as the delimiter for the start and end of the string. You cannot include the delimiter in the string.

If you want to initialise a multi-occurs character field such as an address with a constant value you will need to use a string that is carefully constructed. See below for details.

'ABC 123'
"Hello World"
Date

Use the day.month.year format (not your preferred format), where day, month and year are numbers. The Year should be between 100 and 9999, if the year is below 100 1900 is added.
Dates must be valid according to the rules used for the Gregorian calendar.

8.1.1999 (8th Jan 1999)
02.07.63 (2nd July 1963)
1.1.2000 (1st Jan 2000)
20.3.1 (20th Mar 1901)
Numeric

A numeric constant uses the following syntax Optional -, 1 or more digits including an optional decimal point.

1
99999.99
-7.5
Time

Use the hours:minute:second:hundredth format, where all four parts are two digit constants.
The format hh:mm:ss.hh is also accepted.
Times must be between 00:00 and 23:59:59.99.
Seconds and/or hundredths may be omitted, if so they are set to 0.

12:14:56:99
12:14:56.99
17:30:45
17:00

For types other than character you can use a number of constants separated by the concatenation operator to assign to a multi-occurs field. For example a multi-occurs numeric field could be intialised like this: 1 |2 | 3

Null Constants

Null values are denoted using the following identifiers:

Field Type Null Name
Character null_char
Date null_date
Numeric null_number
Time null_time

Testing for NULL

If you want to test for a NULL value, you usually only need expression = NULL or expression <> NULL irrespective of data type.

There is no null value for Boolean fields.

Take care to assign all the values of an occurs field. If you assign fewer occurs than the field has, then it is padded with the last value specified

Initialising Multi-occurs Character Fields

To intialise the contents of a multi-occurs character field using a constant, consider the field as one long character field including all the occurrences next to each other. For example, to assign a multi-occurs field ADDRESS of type C20*4, consider it as a field of length 80. Address each character according to its position within the character string(an X shows the start of each occurrence):

 X1234567890123456789
"123 Cherry Lane
X1234567890123456789
Stokehampton
X1234567890123456789
Cheshire
X1234567890123456789
ST8 5LN
 
"

The trailing spaces can be omitted if you like. You may find it easier to initialise each occurrence separately, and this will be necessary if the field is bigger than the maximum size of a formula.