Sign in Join
Wiki copytemporary

Shortint/fr: what changed

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

Title: Shortint/fr

OldNewLine
1+Un entier court est un entier signé dans l'intervalle allant de -128 à 127. Sa taille est de 8 bits (1 octet). Contrairement au type [[Byte/fr|Byte]] qui a aussi une taille de 8 bits, il est signé.
2+
3+``` pascal
4+var
5+ a_shortint: shortint;
6+ a_byte : byte;
7+ s1, s2 : string;
8+begin
9+ a_shortint := %11110001; // nombre binaire
10+ a_byte := %11110001;
11+ s1 := IntToStr(a_shortint); // s1 = '-15'
12+ s2 := IntToStr(a_byte); // s2 = '241'
13+```
14+
15+## Voir aussi
16+
17+- [[Not/fr|fonction OnesComplement2]]
18+- [[Smallint/fr|Smallint]] est un entier dont les valeurs s'étendent de -32768 à 32767
19+- [[Binary numeral system/fr|Nombres binaires]]
20+- [[IntToStr/fr|IntToStr]] Convertit un entier en chaînes de caractères
21+
22+---
23+*From the Free Pascal wiki, page "Shortint/fr", as it stood on 2020-01-29 after a change by Bart, 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