Primitive Type

The different integer types designate their width in bits. They are not declared as signed or unsigned. Instead their value is the result of either signed or unsigned operations.

    byte   -  8 bits             word - 32 bits
    parcel - 16 bits             cell - 64 bits

Integer constants can be decimal, hexadecimal, octal, or binary. The latter three formats respectively use prefixes "#", "8#", and "2#". They can also have a lead plus or minus sign or a tilde which denotes a logical complement. Underscores can be used within constants for formatting.

   44   -3   ~#F   2#1001_0011   8#555

Floating Point types are either signed single or double precision.

    single - 32 bits             double - 64 bits

Floating point constants can be written as decimal or hexadecimal values. A pound sign prefix denotes a hexadecimal value. A lead plus or minus sign may also be used. They can also be written in scientific notation.

    3.14159   1e-10    #1.234p3

Strings consist of a sequence of 8 bit characters and thier length may vary. Memory for strings is allocated as needed and is automatically managed. The null (value zero) character may be included in a string. String constants can be enclosed in single or double quotes. An integer value can also be set to a single quoted character.

   "alpha"   'c'   ""   "don't"

The internal String encoding is devised to optimize performance. The Gilda Run Time system includes a high performance memory manager for strings.

Numeric variables can be initialized to a given value or else they default to zero. You can use a question mark to denote an unknown value; in which case the memory will be unitinitialized. This intended for use in performance sensitive procedures, particularly when using arrays. Strings always contain a value and default to an empty string.

This is an example of various primitive type declarations. It declares variables that are local to a method.

   local I = 1      word,          &Initialized to 1.
         D          double,        &Initialized to 0.
         A[99] = ?  parcel,        &Uninitialized array of 16 bit values.
         S          string,        &Initialized to an empty string.
         T = "!"    string         :Initialized to an exclamation point.

Sequence Procedure

Micro and Macro