diff --git a/specification.md b/specification.md index a5098f7..fd62393 100644 --- a/specification.md +++ b/specification.md @@ -229,10 +229,11 @@ Modifications made to an array inside a function are visible outside the functio arr[2] = 42; } - void main() { + int main() { int[5] arr; foo(arr); print_int(arr[2]); // outputs 42 + return 0; } While strings can be re-assigned (in contrast to arrays), this is not visible outside the function call. @@ -241,11 +242,12 @@ While strings can be re-assigned (in contrast to arrays), this is not visible ou s = "foo"; } - void main() { + int main() { string s; s = "bar"; foo(s); print(s); // outputs bar + return 0; } #### Type Conversion