ARRAY OF type Arrays of values of any other single 4GL data type
BYTE Any kind of binary data, of length up to 231 bytes
CHAR(size) Character strings, of size up to 32,767 bytes in length
CHARACTER This keyword is a synonym for CHAR
DATE Points in time, specified as calendar dates
DATETIME Points in time, specified as calendar dates and time-of-day
DEC This keyword is a synonym for DECIMAL
DECIMAL(p,s)d Fixed-point numbers, of a specified scale and precision
DECIMAL(p) Floating-point numbers, of a specified precision
DOUBLE PRECISION These keywords are a synonym for FLOAT
FLOAT Floating-point numbers, of up to 32-digit precision
INT This keyword is a synonym for INTEGER
INTEGER Whole numbers, from -2,147,483,647 to +2,147,483,647
INTERVAL Spans of time in years and months, or in smaller time units
MONEY Currency amounts, with definable scale and precision
NCHAR(size) Character strings, of size up to 32,767 bytes in length
NUMERIC This keyword is a synonym for DECIMAL
NVARCHAR(size) Character strings of varying length, for size ≤ 255 bytes
(1 of 2)
Data Types and Expressions 3-7
Data Types of 4GL
Except for ARRAY and RECORD, the 4GL data types correspond to built-in SQL
data types of Informix database servers. The data types of 4GL approximate
a superset of the SQL data types that 7.x Informix database servers recognize,
but with the following restrictions:
The SERIAL data type of SQL is not a 4GL data type. (Use the INTEGER
data type to store SERIAL values from a database.) You cannot use the
SERIAL keyword in 4GL statements that are not SQL statements.
4GL does not recognize the BITFIXED, BITVARYING, BLOB, BOOLEAN,
CLOB, DISTINCT, INT8, LIST, LVARCHAR, MULTISET, OPAQUE,
REFERENCE, ROW, SERIAL8, SET, or user-defined data types of
Informix database servers.
Declarations of 4GL variables, formal arguments, and returned values use the
following syntax to specify data types directly.
REAL This keyword is a synonym for SMALLFLOAT
RECORD Ordered sets of values, of any combination of data types
SMALLFLOAT Floating-point numbers, of up to 16-digit precision
SMALLINT Whole numbers, from -32,767 to +32,767
TEXT Character strings of up to 231 bytes
VARCHAR(size) Character strings of varying length, for size ≤ 255 bytes
Whole Number SMALLINT
INTEGER, INT
Integers, ranging from -32,767 to +32,767
Integers, ranging from -2,147,483,647 to +2,147,483,647
(that is, -(231 -1) to (231 -1))
Fixed-Point DECIMAL (p, s),
DEC(p, s),
NUMERIC(p, s)
MONEY (p, s)
Fixed-point numbers, of scale s and precision p
Currency values, of scale s and precision p
Floating-Point DECIMAL (p),
DEC(p),
NUMERIC(p)
FLOAT,
DOUBLE PRECISION
SMALLFLOAT, REAL
Floating-point numbers of precision p (but see “DECIMAL
(p)” on page 3-24 for information about ANSI-compliant
databases)
Floating-point, double-precision numbers
Floating-point, single-precision numbers