« Delphi/Opérateurs » : différence entre les versions

Contenu supprimé Contenu ajouté
m Robot : Remplacement de texte automatisé (-(<|</)source([ \t>]) +\1syntaxhighlight\2)
 
Ligne 25 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
var
x, y: integer;
Ligne 34 :
x := y; //x = 3 (valeur de y)
end;
</syntaxhighlight>
</source>
}}
 
Ligne 46 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
 
var
Ligne 56 :
z := x + y; //Z a maintenant la valeur 8 (valeur de x plus y)
end.
</syntaxhighlight>
</source>
}}
 
Ligne 66 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
 
var
Ligne 76 :
z := x - y; //Z = 2 (valeur de x moins y)
end.
</syntaxhighlight>
</source>
}}
 
Ligne 86 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
 
var
Ligne 96 :
z := x * y; //Z = 15 (valeur de x fois y)
end.
</syntaxhighlight>
</source>
}}
 
Ligne 106 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
 
var
Ligne 117 :
z := x / y; //Z = 1.666 (valeur de x divisé par y)
end;
</syntaxhighlight>
</source>
}}
 
Ligne 127 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
 
var
Ligne 137 :
z := x div y; //Z = 1 (valeur de x divisé par y)
end;
</syntaxhighlight>
</source>
}}
 
Ligne 147 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
 
var
Ligne 157 :
z := x mod y; //Z = 2 (reste de x divisé par y)
end;
</syntaxhighlight>
</source>
}}
 
Ligne 171 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
var
x, y: boolean;
Ligne 178 :
y := not x; // y = false
end.
</syntaxhighlight>
</source>
}}
 
Ligne 186 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
var
x, y, z: boolean;
Ligne 194 :
z := y and x; // z = false
end.
</syntaxhighlight>
</source>
}}
 
Ligne 202 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
var
x, y, z: boolean;
Ligne 210 :
z := y or x; // z = true
end.
</syntaxhighlight>
</source>
}}
 
Ligne 218 :
| contenu =
 
<sourcesyntaxhighlight lang="Delphi">
var
x, y, z: boolean;
Ligne 226 :
z := y xor x; // z = true
end.
</syntaxhighlight>
</source>
}}