summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorven <vendethiel@hotmail.fr>2015-03-01 15:39:15 +0100
committerven <vendethiel@hotmail.fr>2015-03-01 15:39:15 +0100
commit733eced1bae0c341ff8819436f544d1f2b7a8b72 (patch)
treed382ce842556451cf960f8a178be2c9a93985144
parent0bcc9c48913e88bd00c81cd32a5eba7960be4ae0 (diff)
parentccca29377a48da6dabbb08446ec7c3299f9165b9 (diff)
Merge pull request #979 from def-/master
Fix Nim a bit
-rw-r--r--nim.html.markdown12
1 files changed, 10 insertions, 2 deletions
diff --git a/nim.html.markdown b/nim.html.markdown
index c74fece7..2172f40f 100644
--- a/nim.html.markdown
+++ b/nim.html.markdown
@@ -3,14 +3,15 @@ language: Nim
filename: learnNim.nim
contributors:
- ["Jason J. Ayala P.", "http://JasonAyala.com"]
+ - ["Dennis Felsing", "http://felsin9.de/nnis/"]
---
-Nim (formally Nimrod) is a statically typed, imperative programming language
+Nim (formerly Nimrod) is a statically typed, imperative programming language
that gives the programmer power without compromises on runtime efficiency.
Nim is efficient, expressive, and elegant.
-```ruby
+```nimrod
var # Declare (and assign) variables,
letter: char = 'n' # with or without type annotations
lang = "N" & "im"
@@ -60,6 +61,13 @@ var
drinks = @["Water", "Juice", "Chocolate"] # @[V1,..,Vn] is the sequence literal
+drinks.add("Milk")
+
+if "Milk" in drinks:
+ echo "We have Milk and ", drinks.len - 1, " other drinks"
+
+let myDrink = drinks[2]
+
#
# Defining Types
#