From 5bb5df143a1b6ef6c3ca5582dbef0a5e34168693 Mon Sep 17 00:00:00 2001 From: Audun Wilhelmsen Date: Thu, 26 Dec 2013 13:58:47 -0800 Subject: [PATCH] Updated Nimrod for C programmers (markdown) --- Nimrod-for-C-programmers.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Nimrod-for-C-programmers.md b/Nimrod-for-C-programmers.md index 8b3cd71..ad6f5c9 100644 --- a/Nimrod-for-C-programmers.md +++ b/Nimrod-for-C-programmers.md @@ -1,13 +1,13 @@ (Work in progress) -This is a guide for people with experience in C or a similar language. The general tutorials can be found here: +This is a guide for people with experience in C or a similar language. The guide assumes knowledge of how stacks and heaps works. +The general tutorials can be found here: http://nimrod-lang.org/tut1.html http://nimrod-lang.org/tut2.html The manual provides a more or less complete overview of the language: - -http://nimrod-lang.org/manual.html +http://nimrod-lang.org/manual.html ### At a glance @@ -58,6 +58,8 @@ In C, you can pass an ``int[3]`` to the foobar function, and the compiler will n Nimrod arrays can also be indexed from any number. That is, ``z: array[1..4, int]`` is an array of int indexed from 1 to 4. Trying to access ``z[0]`` would throw an index out bounds error. +In C, there's nothing that keeps you from keeping a pointer to a stack-allocated array + ### Structs - Tuples and Objects Tuples and Objects in Nimrod are kind of like structs in C, but not really.