diff options
author | Elena Bolshakova <lena-san@yandex-team.ru> | 2015-06-10 11:34:14 +0300 |
---|---|---|
committer | Elena Bolshakova <lena-san@yandex-team.ru> | 2015-06-10 11:34:14 +0300 |
commit | 193f66553fc114e83e7c4cfb4607e4a1b57c4f09 (patch) | |
tree | 30988e25d31ed6dff83cf409ad093c3c7ec9322c /nim.html.markdown | |
parent | 676568cca8731d0dbb2d2bdeff08cc092d283177 (diff) | |
parent | 5086480a04d27cff2380f04609210082000538d4 (diff) |
Merge branch 'master' of https://github.com/adambard/learnxinyminutes-docs
Diffstat (limited to 'nim.html.markdown')
-rw-r--r-- | nim.html.markdown | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/nim.html.markdown b/nim.html.markdown index c74fece7..c9548a1c 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 # @@ -147,7 +155,7 @@ var anotherArray = ["Default index", "starts at", "0"] # More data structures are available, including tables, sets, lists, queues, # and crit bit trees. -# http://nimrod-lang.org/lib.html#collections-and-algorithms +# http://nim-lang.org/docs/lib.html#collections-and-algorithms # # IO and Control Flow @@ -166,7 +174,7 @@ else: # `while`, `if`, `continue`, `break` -import strutils as str # http://nimrod-lang.org/strutils.html +import strutils as str # http://nim-lang.org/docs/strutils.html echo "I'm thinking of a number between 41 and 43. Guess which!" let number: int = 42 var @@ -255,11 +263,11 @@ performance, and compile-time features. ## Further Reading -* [Home Page](http://nimrod-lang.org) -* [Download](http://nimrod-lang.org/download.html) -* [Community](http://nimrod-lang.org/community.html) -* [FAQ](http://nimrod-lang.org/question.html) -* [Documentation](http://nimrod-lang.org/documentation.html) -* [Manual](http://nimrod-lang.org/manual.html) -* [Standard Libray](http://nimrod-lang.org/lib.html) -* [Rosetta Code](http://rosettacode.org/wiki/Category:Nimrod) +* [Home Page](http://nim-lang.org) +* [Download](http://nim-lang.org/download.html) +* [Community](http://nim-lang.org/community.html) +* [FAQ](http://nim-lang.org/question.html) +* [Documentation](http://nim-lang.org/documentation.html) +* [Manual](http://nim-lang.org/docs/manual.html) +* [Standard Library](http://nim-lang.org/docs/lib.html) +* [Rosetta Code](http://rosettacode.org/wiki/Category:Nim) |