diff --git a/Nimrod-for-C-programmers.md b/Nimrod-for-C-programmers.md index bddb2f4..9fde0b3 100644 --- a/Nimrod-for-C-programmers.md +++ b/Nimrod-for-C-programmers.md @@ -34,7 +34,7 @@ The other important thing to know is that while C uses a separate language to do In C an array is more or less syntactic sugar for pointers. In Nimrod, arrays are much more strict and safe to use. They are pass-by-value (meaning they're copied at assignment). When passing an array to a proc in Nimrod, the argument is a read-only reference, meaning it can't be assigned to. Take the following example: **C:** -```C +```c void foobar(int z[4]) { z[5] = 5; printf("%d\n",z[5]); @@ -48,7 +48,7 @@ int main() { ``` **Nimrod:** -```Nimrod +```nimrod proc foobar(z: array[0..3, int]) = z[5] = 5 # Error: Cannot assign to z echo z[5] # Error: Index out of bounds.