nitlanguage
/
nit.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
1c6c39789620cc0e943a787ef4a8689e144dbef3
[nit.git]
/
doc
/
developpez
/
syntaxe
/
listings
/
typage_c.nit
1
var
x
# Déclaration d'une variable locale
2
3
x
=
5
# Le type statique de x devient Int
4
print x
+
1
# Affiche 6
5
6
x
= [
6
,
7
]
# Le type statique de x devient Array[Int]
7
print x
[
0
]
# Affiche 6