See #20 for context:

> allows the procedure to be stored in a variable and called correctly (even with default parameters).
> As said by Araq on IRC:
>> 'procvar' doesn't do much [...] it's just another check for semantic checking. codegen is not affected.
This commit is contained in:
Flaviu Tamas 2015-02-01 20:14:08 -05:00
commit 4ed8b34d0f

View file

@ -20,7 +20,7 @@ $ nim c -r filterclosure.nim
@[64, 128, 256] @[64, 128, 256]
``` ```
Existing procedures can also be passed as functions, but only if they are annotated with the `{.procvar.}` pragma. Existing procedures can also be passed as functions, but only if they are annotated with the `{.procvar.}` pragma. This is because there may be default parameters, which must be specially handled by the compiler.
``` nimrod ``` nimrod
proc greaterThan32(x: int): bool {.procvar.} = x > 32 proc greaterThan32(x: int): bool {.procvar.} = x > 32