Boolean/fr
Deutsch · English · Français · Suomi · Русский · 中文(中国)
Boolean est un type de donnée logique. Une donnée du type Boolean prend seulement l'une des deux valeurs True ou False. Une variable booléenne occupe un octet en mémoire.
La valeur True est indique qu'une comparaison ou qu'un test est vérifié ; la valeur false indique la valeur Faux pour un test ou une comparaison.
var
tooLarge : Boolean = false;
boolString : ShortString;
begin
Writeln(tooLarge);
tooLarge := (0 = 0);
Writeln(tooLarge);
tooLarge := (3 > 5);
Writeln(tooLarge);
tooLarge := true;
Writeln(tooLarge);
if tooLarge then
Writeln('tooLarge is true')
else
Writeln('tooLarge is false');
WriteStr(boolString,tooLarge);
Writeln(boolString);
endOuputs:
FALSE
TRUE
FALSE
TRUE
tooLarge is true
TRUELire en plus
From the Free Pascal wiki, page "Boolean/fr", as it stood on 2023-01-25 after a change by Kai Burghardt, 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.