nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
doc: french doc "développez en Nit"
[nit.git]
/
doc
/
developpez
/
poo
/
listings
/
constructeur3_c.nit
diff --git a/doc/developpez/poo/listings/constructeur3_c.nit
b/doc/developpez/poo/listings/constructeur3_c.nit
new file mode 100644
(file)
index 0000000..
44f7700
--- /dev/null
+++ b/
doc/developpez/poo/listings/constructeur3_c.nit
@@ -0,0
+1,14
@@
+class MaClasse
+
+ var entier: Int
+ var chaine: String
+
+ # Réécriture du constructeur par défaut
+ init(i: Int, s: String)
+ do
+ entier = i
+ chaine = s
+ end
+end
+
+var o = new MaClasse(10, "toto")