Sign in Join
Wiki copytemporary

Boolean/fr: what changed

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

OldNewLine
11**Boolean** est un type de donnée logique. Une donnée du type Boolean prend seulement l'une des deux valeurs [[True/fr|True]] ou [[False/fr|False]]. Une variable booléenne occupe un octet en mémoire.
22
33La 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.
44
55``` pascal
66var
77 tooLarge : Boolean = false;
88 boolString : ShortString;
99begin
1010 Writeln(tooLarge);
1111 tooLarge := (0 = 0);
1212 Writeln(tooLarge);
1313 tooLarge := (3 > 5);
1414 Writeln(tooLarge);
1515 tooLarge := true;
1616 Writeln(tooLarge);
1717 if tooLarge then
1818 Writeln('tooLarge is true')
1919 else
2020 Writeln('tooLarge is false');
2121 WriteStr(boolString,tooLarge);
2222 Writeln(boolString);
2323end
2424```
2525
2626Ouputs:
2727
28-`FALSE`\
29-`TRUE`\
30-`FALSE`\
31-`TRUE`\
32-`tooLarge is true`\
33-`TRUE`
28+```
29+FALSE
30+TRUE
31+FALSE
32+TRUE
33+tooLarge is true
34+TRUE
35+```
3436
3537## Lire en plus
3638
3739- [[Basic Pascal Tutorial/Chapter 3/Boolean Expressions/fr|Expressions booléennes]]
3840
3941---
4042*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](/wiki-contact).*

Back to history