data.representation Definition/BASIC Program


Command data.representation Definition/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description data types employed in Pick/BASIC.

There are primarily two types of data: numeric and string.

Numeric data consists of a series of digits and represents an amount, such as 123.

String data consists of a set of characters, such as "Jan Smith".

A numeric value in the range of: {+/-}140737488355327*(10(-p)) where "p" is the precision value between 0 and 9, is stored as numeric data. A numeric value outside this range is stored as string data.

In order to maintain maximum accuracy, when an operation causes an overflow condition, a precision of up to 18 digits to the right of the decimal is kept internally.

Results of addition (+), subtraction (-), division (/), and multiplication (*), and remainder (/) operations that exceed this range of {+/-}140737488355327*(10(-p)) have no limitation on their numeric range.

For the comparison operators such as less than (<), equal (=), greater than (>), and the arithmetic functions int(x), abs(x), mod(x,y), and rem(x,y), there is no limitation, since the result is limited to a 1 or 0.

The Pick/BASIC functions "ln", "sqrt", "pwr", and "exp" can be as large as

A string may contain up to 2 gigabytes of characters in Advanced Pick. A string constant is represented by a set of characters delimited by single quotes ('), double quotes ("), or backslashes (). If any of the string delimiters are to be part of the string, then one of the other delimiters must be used to delimit the string.

Numeric and string data may be represented within the Pick/BASIC program as either constants or variables. A constant, as its name implies, has the same value throughout the execution of the program. A variable may contain data types other than string and numeric data (root, active list, file.variable), but these representations are limited to specific statements.
Related basic.assignment