summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--nim.html.markdown23
-rw-r--r--r.html.markdown3
2 files changed, 21 insertions, 5 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
diff --git a/r.html.markdown b/r.html.markdown
index 7a94ba05..e7486e60 100644
--- a/r.html.markdown
+++ b/r.html.markdown
@@ -663,7 +663,8 @@ require(plyr)
# "pets.csv" is a file on the internet
# (but it could just as easily be a file on your own computer)
-pets <- read.csv("http://learnxinyminutes.com/docs/pets.csv")
+require(RCurl)
+pets <- read.csv(textConnection(getURL("http://learnxinyminutes.com/docs/pets.csv")))
pets
head(pets, 2) # first two rows
tail(pets, 1) # last row