"ingo" <nomail@nomail> wrote:
>
> Just as an example how it works in an other language. In the Nim programming
> language
I should have added one more option as it does what one can do with macro's.
Note there is now no output type specified and thus no return value. 'a' is
modified "in place".
proc dothing(a: var int, b: int) =
a = a + b
var a = 1
let b = 2
dothing(a, b) # or a.dothing(b)
echo a #printed result is sum of and b
ingo
Post a reply to this message
|