Sign in Join
Wiki copytemporary

UInt16/fr: what changed

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

Title: UInt16/fr

OldNewLine
1+Plage de valeurs: 0 .. 65 535
2+
3+Occupation en mémoire: 2 octets soit 16 Bits
4+
5+Propriété: Un [[Data field/fr|champ de donnée]] de [[Data type/fr|type de donnée]] **UInt16** ne peut recevoir que des valeurs entières positives de la plage indiquée.\
6+Tout autre valeur conduit à une erreur de compilation, le programme ne sera donc pas créé.\
7+Déclaration d'un champ de donnée de type UInt16 :
8+
9+``` pascal
10+ Var
11+ ui16: uint16;
12+```
13+
14+Exemple d'affectations correctes :
15+
16+``` pascal
17+ ui16 := 0;
18+ ui16 := 65535;
19+```
20+
21+Exemple d'affectations incorrectes :
22+
23+``` pascal
24+ ui16 := '0';
25+ ui16 := '32767';
26+```
27+
28+Ces deux derniers exemples tentent d'affecter des valeurs littérales non entières ([[String|string]]) qui demandent une conversion explicite.
29+
30+---
31+*From the Free Pascal wiki, page "UInt16/fr", as it stood on 2020-03-01 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