diff options
author | Julien M'Poy <julien.mpoy@gmail.com> | 2017-11-08 13:29:24 +0100 |
---|---|---|
committer | Julien M'Poy <julien.mpoy@gmail.com> | 2017-11-08 13:29:24 +0100 |
commit | 5e81853768c0f3cc55c05e0dfec18773045df952 (patch) | |
tree | b62c3fb0bfc6de3318e962b330e163f3d65cdfa6 /nim.html.markdown | |
parent | 20893f5d83b4f7a1585bac9e7656d6af46183262 (diff) | |
parent | 6ce71c56d6affb57a3537a2732485a4918306d4b (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'nim.html.markdown')
-rw-r--r-- | nim.html.markdown | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/nim.html.markdown b/nim.html.markdown index 07674532..30dfa94f 100644 --- a/nim.html.markdown +++ b/nim.html.markdown @@ -12,6 +12,25 @@ that gives the programmer power without compromises on runtime efficiency. Nim is efficient, expressive, and elegant. ```nim +# Single-line comments start with a # + +#[ + Multi-line comments begin with a #[ + ... and end with ]# + +They don't care about indentation + + #[ + and they can be nested + ]# + +]# + +discard """ +This can also work as a multiline comment. +Or for unparsable, broken code +""" + var # Declare (and assign) variables, letter: char = 'n' # with or without type annotations lang = "N" & "im" @@ -35,10 +54,6 @@ when compileBadCode: # `when` is a compile time `if` discard 1 > 2 # Note: The compiler will complain if the result of an expression # is unused. `discard` bypasses this. -discard """ -This can work as a multiline comment. -Or for unparsable, broken code -""" # # Data Structures |