Shortint/fr
Deutsch · English · Français · Suomi · Русский
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 qui a aussi une taille de 8 bits, il est signé.
var
a_shortint: shortint;
a_byte : byte;
s1, s2 : string;
begin
a_shortint := %11110001; // nombre binaire
a_byte := %11110001;
s1 := IntToStr(a_shortint); // s1 = '-15'
s2 := IntToStr(a_byte); // s2 = '241'Voir aussi
- fonction OnesComplement2
- Smallint est un entier dont les valeurs s'étendent de -32768 à 32767
- Nombres binaires
- IntToStr Convertit un entier en chaînes de caractères
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.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
