Sign in Join
Wiki copytemporary

Comp/fr: what changed

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

Title: Comp/fr

OldNewLine
1+Plage de valeurs : -2E64+1 .. 2E63-1
2+
3+Précision : 19 positions
4+
5+Occupation en mémoire : 8 octets soit 64 Bit
6+
7+Propriété : Un [[Data field/fr|champ de donnée]] de [[Data type/fr|type de donnée]] **Comp** accepte des valeurs en virgule flottantes ou des entiers, signés ou non.
8+
9+Tout autre valeur conduit à une erreur de compilation, le programme ne sera donc pas créé.
10+
11+Important : Le type **Comp** n'est supporté que par les processeurs 80x86 (ce type n'est donc pas portable).
12+
13+Déclaration d'un champ de donnée de type Comp :
14+
15+``` pascal
16+ Var
17+ c: Comp;
18+```
19+
20+Exemple d'affectations correctes :
21+
22+``` pascal
23+ c := -123.45678;
24+ c := 0;
25+ c := 123.45678;
26+```
27+
28+Exemple d'affectations incorrectes :
29+
30+``` pascal
31+ c := '-123.45678';
32+ c := '0';
33+ c := '123.45678';
34+```
35+
36+Ces derniers exemples tentent d'affecter des valeurs littérales non entières (string) qui demandent une conversion explicite.
37+
38+---
39+*From the Free Pascal wiki, page "Comp/fr", as it stood on 2020-02-11 after a change by Trev, 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