Sign in Join
Wiki copytemporary

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.

pascal
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);
end

Ouputs:

text
FALSE
TRUE
FALSE
TRUE
tooLarge is true
TRUE

Lire 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.

Revision 3, last changed by WikiArchive .

Edited on wiki.freepascal.org by 4 people, 2014–2023

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
E-ricCreated page
E-ric
E-ric
E-ric
E-ric
E-ric (minor)
E-ric
E-ric (minor)
E-ric
FTurtle
E-ric (minor)
E-ric (minor)
E-ric (minor)
BartUse pascal highlighter
Kai Burghardtbypass redirect to Basic Pascal Tutorial/Chapter 3/Boolean Expressions/fr, improve formatting (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.