Data Types

A field or constant has a specific Type that determines its allowable values. Operators and functions work on items of certain types and yield a result of a specific type.

Expressions can include items of any of the field data types available in iProcess:

Field Type

Description

Text

Strings of text characters in the iProcess Internal Character Set (SICS), length 0 to 255 characters.

A text constant consists of the characters enclosed in quotes, e.g "Peter". (To include the quote character itself in a text constant, include it twice, "".)

Memo

Standard text memos.

For example, you can create the following expressions:

memofield := text
memofield := memofield
memofield := memofield + text
textfield := memofield
textfield := memofield + text

For the last two examples, you need to be aware that truncation of the memo data can occur because the maximum length of a text field is 255 characters.

If you are adding text to a memo, you can use the SPECIALCHARS /n option to add the text on a new line, for example:

expr: memofield := memofield + memofield

memofield := memofield + specialchars ("\nAdd text on a new line\n")

You can only use the following functions with memofields:

STRLEN
SEARCH and RSEARCH

Numeric

Numbers in the range –99,999,999,999,999 to 999,999,999,999,999, including decimals.

Numeric constants are written using the usual digits, with a period for decimal numbers, and a - sign for negative numbers, for example -2.6.

(Your system may be set up to use a comma as a decimal separator, for example -2,6.)

Date

Dates in the range 1/1/0 to 31/12/2999.

A date constant is written !DD/MM/YYYY!, for example !06/09/1997! is 6th September, 1997.

(Your system may be set up for a different format, for example !MM/DD/YYYY!.)

Time

Times, resolution to minutes.

A time constant is written #HH:MM# (24-hour clock format - range #00:00# to #23:59#.)

In addition to the field data types, the following types can also appear in iProcess expressions:

Type

Description

Boolean

Result of a relational/logical operation (i.e. true or false).

Note that a Boolean constant cannot be entered.

Date Offset

A constant used in expressions to modify date types, written @day/week/month/year@, so @2/0/1/0@ will increment a date by 1 month and 2 days.

(Note that the numbers must be constants; to increment a date by the contents of fields, there is a function
CALCDATE available.)

Vartype

Used to handle variable data types for the SELECTVAL and SWITCHVAL functions. A vartype will return or accept as input any data type currently available in iProcess.

An expression as a whole has a particular type; the allowed expression types are: Text, Numeric, Date, Time, and Boolean.