data representation

data representation


Compile time/date stamps (R83) Index Level error condition
Syntax
Category BASIC
Type Definition
Description data types employed in FlashBASIC.

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 FlashBASIC functions "ln", "sqrt", "pwr", and "exp" can be as large as
(+/-)140737488355327x(10(-p)).

A string may contain up to 2 gigabytes of characters in D3. 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 FlashBASIC 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.
Options
See Also assignment active list logical expressions ac.expression file.variable
Example
Warnings
Compatibility D3 7.0 AP R83
Compile time/date stamps (R83) Index Level error condition