doc: french doc "développez en Nit"
[nit.git] / doc / developpez / syntaxe / listings / if_c.nit
diff --git a/doc/developpez/syntaxe/listings/if_c.nit b/doc/developpez/syntaxe/listings/if_c.nit
new file mode 100644 (file)
index 0000000..39aab0d
--- /dev/null
@@ -0,0 +1,17 @@
+var booleen = true
+if booleen then
+       print "Le booléen vaut TRUE !"
+else
+       print "Le booléen vaut FALSE !"
+end
+#Affiche "Le booléen vaut TRUE !"
+
+var ma_var = 1
+if ma_var < 0 then 
+       print "ma_var est negative"
+else if ma_var > 0 then
+       print "ma_var est positive"
+else
+       print "ma_var = 0"
+end
+#Affiche "ma_var est positive"