The data sets you produce and use may contain a variety of variable types. The characteristics of the types that FreeForm ND supports are summarized in table 3.1, which is followed by a description of each type.
| Name | Minimum Value | Maximum Value | Size in Bytes | Precision* |
char | ** | |||
uchar | 0 | 255 | 1 | |
short | -32,767 | 32,767 | 2 | |
ushort | 0 | 65,535 | 2 | |
long | -2,147,483,647 | 2,147,483,647 | 4 | |
ulong | 0 | 4,294,967,295 | 4 | |
float | 10-37 | 1038 | 4 | 6*** |
double | 10-307 | 10308 | 8 | 15*** |
| * Expressed as the number of significant digits | ||||
| ** User-specified | ||||
| *** Can vary depending on environment | ||||
NOTE: The sizes in table 3.1 are machine-dependent.
Those given are for most Unix workstations.
charchar variable type is used for character strings.
Variables of this type, including numerals, are interpreted as
characters, not as numbers.
ucharuchar (unsigned character) variable type can be used for
integers between 0 and 255 (28- 1). Variables that can be
represented by the uchar type (for example: month, day, hour,
minute) occur in many data sets. An advantage of using the uchar
type in binary formats is that only one byte is used for each
variable. Variables of this type are interpreted as numbers, not
characters.
shortshort variable can hold integers between -32,767 and 32,767
(215- 1). This type can be used for signed integers with less
than 5 digits, or for real numbers with a total of 4 or fewer digits
on both sides of the decimal point (-99 to 99 with a precision of 2,
-999 to 999 with a precision of 1, and so on).
ushortushort (unsigned short) variable can hold integers between 0
and 65,535 (216 - 1).
longlong variable can hold integers between -2,147,483,647 and
+2,147,483,647 (231 - 1). This variable type is commonly used
to represent floating point data as integers, which may be more
portable. It can be used for numbers with 9 or fewer digits with up
to 9 digits of precision, for example, latitude or longitude
(-180.000000 to 180.000000).
ulongulong (unsigned long) variable type can be used for
integers between 0 and 4,294,967,295 (232 - 1).
float, doublefloat
or double depending on the desired number of digits. A
float has a maximum of 6 significant digits, a double
has 15 maximum. The extra digits of a double are useful, for
example, for precisely specifying time of day within a month as
decimal days. One second of time is approximately 0.00001 day. The
number specifying day (maximum = 31) can occupy up to 2 digits. A
float can therefore only specify decimal days to a whole
second (31.00001 occupies seven digits). A double can,
however, be used to track decimal parts of a second (for example,
31.000001).
header