613-518-1166 info@zimdatabases.com

Developing ZIM Applications

Data Types and Storage of Values

< All Topics

ALPHA/CHAR and VARALPHA/ VARCHAR Values

If an ALPHA or CHAR object is assigned the value abc///// (with five trailing blanks), it is stored as abc///// (fixed length value).

If a VARALPHA or VARCHAR object is assigned the value abc/////, it is stored as abc without any trailing blanks, but with an indicator that gives the length of the value (variable length value).

Maximum Lenth for ALPHA/CHAR and VARALPHA/VARCHAR

ALPHA CHAR VARAPLHA VARCHAR
32767 bytes 32767 bytes 32767 bytes 32767 bytes

INT and LONGINT Values

INT, LONGINT and VASTINT values are stored “without decimals”. Actually, the decimal information is stored separately.

The “non-decimal” value (value of the significant digits) must fall within the range of the applicable data type.

Examples – INT Values

Value Significant Digits Number of Decimals Valid Maximum/Minimum Values
123.4 1234 1 3276.7 / -3276.8
12.34 1234 2 327.67 / -327.68
12.34 1234 3 32.767 / -32.768
0.01234 1234 5 0.32767 / -0.32768

Examples – LONGINT Values

Value Significant Digits Number of Decimals Valid Maximum/Minimum Values
1.23456 123456 5 21474.83647 / -21474.83647
1234.56 123456 2 21474836.47 / -21474836.47

 

See Also

About Conditional Expressions

Conversion Between Data Types

Data Types and the Use of Database Indexes

How To Use Data Types

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents