Sign in Join
Wiki copytemporary

Comp: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Comp

OldNewLine
1+Value range: -2E64 + 1 .. 2E63-1.
2+
3+Accuracy: 19 positions.
4+
5+Memory occupancy: 8 bytes or 64 bits.
6+
7+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.
8+
9+Important: The Comp type is only supported by 80x86 processors (this type is therefore not portable).
10+
11+Declaration of a data field of type Comp:
12+
13+``` pascal
14+ Var
15+ c : Comp;
16+```
17+
18+Example of correct assignments:
19+
20+``` pascal
21+ c := -123.45678;
22+ c := 0;
23+ c := 123.45678;
24+```
25+
26+Example of incorrect assignments:
27+
28+``` pascal
29+ c := '-123.45678';
30+ c := '0';
31+ c := '123.45678';
32+```
33+
34+These last examples try to affect non-integer literal values ​​(string) which require an explicit conversion.
35+
36+---
37+*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](/wiki-contact).*

Back to history