Sign in Join
Wiki copytemporary

Boolean/fr: what changed

Revision 2 to 3. 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-```
28+```text
2929FALSE
3030TRUE
3131FALSE
3232TRUE
3333tooLarge is true
3434TRUE
3535```
3636
3737## Lire en plus
3838
3939- [[Basic Pascal Tutorial/Chapter 3/Boolean Expressions/fr|Expressions booléennes]]
4040
4141---
4242*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