-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement
caractère
(car
) operations
- Loading branch information
Showing
5 changed files
with
118 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
programme Caractères | ||
programme ExempleCaractères | ||
début | ||
avec rl, mon_char: caractère | ||
avec mon_char: caractère | ||
rl: chaîne | ||
|
||
rl <- '\n' | ||
# `rl` est juste un retour à la ligne. | ||
# Seulement pour montrer que ça fonctionne. | ||
rl <- "\n" | ||
mon_char <- 'a' | ||
afficher "Mon caractère = " + mon_char + rl | ||
afficher "Mon caractère+1 = " + (mon_char+1) + rl | ||
fin Caractères | ||
|
||
# On peut afficher les caractères | ||
# et effectuer des concatenations "chaîne + car". | ||
afficher "mon_char = " + mon_char + rl | ||
|
||
# Les caractères sont considérés comme des nombres, | ||
# donc toutes les opérations sont possible sur eux. | ||
afficher "mon_char + 1 = " + (mon_char + 1) + rl | ||
|
||
# On peut ainsi additionner deux caractères, par exemple. | ||
afficher "'z' - ' ' = " + ('z' - ' ') + rl | ||
fin ExempleCaractères |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ début | |
avec mon_nombre : entier | ||
|
||
mon_nombre <- 10 | ||
hello(b) | ||
hello(mon_nombre) | ||
fin World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters