Simple Data Types

 

A simple 4GL data type can store a single value. The maximum memory used for the storage of a value is set implicitly by the data type declaration or explicitly using indication of size, scale and precision.

 

Indicator

Description

Data Types

(size)

This is the largest amount of bytes that the data type can hold. For CHAR the range can be 1£ size£ 65,534. There is no upper limit for bytes (characters) in the VARCHAR data type, it is limited only by the free memory of the system; the lower limit is 1 as well as in the CHAR data type.

The default number of characters is 1

CHAR (32)

VARCHAR (453)

precision (p)

This is the number significant of digits that can be used. The significant digits are any digits appearing within the number except for the leading zeros, e.g. number 123,45 has 5 significant digits and its precision is 5.  For FLOAT the range is 1 to 14 significant digits.  For DECIMAL & MONEY the range is 1 to 32.

The default number of digits for DECIMAL and MONEY is 16.

FLOAT (3)

DECIMAL (3)

DECIMAL (7,s)

MONEY(6,s)

scale (s)

This is the number of decimal places. There should be 32 or fewer decimal places and the number of decimal places should not exceed the number of significant digits ( scale£precision).

The default number of decimal places for MONEY is 2.

DECIMAL (7, 5)

MONEY (6, 2)

 

All the above mentioned parameters should be specified using numbers from 1 to 9 and 0, without embedded blank spaces or commas, and without a decimal point.

 

The simple data types can be subdivided into three large groups: number, time and character.

 

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.