Wiki copymirror

This is a mirror of the wiki at pascal.chat. Editing, history and sign-in are there.

Comp

Deutsch · English · Français

Value range: -2E64 + 1 .. 2E63-1.

Accuracy: 19 positions.

Memory occupancy: 8 bytes or 64 bits.

Property: A data field of data type Comp accepts floating point values ​​or integers, signed or unsigned. Any other value leads to a compilation error, so the program will not be created.

Important: The Comp type is only supported by 80x86 processors (this type is therefore not portable).

Declaration of a data field of type Comp:

pascal
  Var 
    c : Comp;

Example of correct assignments:

pascal
    c := -123.45678;
    c := 0;
    c := 123.45678;

Example of incorrect assignments:

pascal
    c := '-123.45678';
    c := '0';
    c := '123.45678';

These last examples try to affect non-integer literal values ​​(string) which require an explicit conversion.


From the Free Pascal wiki, page "Comp", as it stood on 2023-12-22 after a change by Alextpp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .