Added `global` pragma that can be used to introduce new global variables from within procs
This commit is contained in:
parent
8d698b2bdd
commit
6d80583d5a
6 changed files with 22 additions and 10 deletions
|
|
@ -58,7 +58,7 @@ type
|
|||
wWatchPoint, wSubsChar,
|
||||
wAcyclic, wShallow, wUnroll, wLinearScanEnd,
|
||||
wWrite, wPutEnv, wPrependEnv, wAppendEnv, wThreadVar, wEmit, wNoStackFrame,
|
||||
wImplicitStatic
|
||||
wImplicitStatic, wGlobal
|
||||
|
||||
TSpecialWords* = set[TSpecialWord]
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ const
|
|||
"watchpoint",
|
||||
"subschar", "acyclic", "shallow", "unroll", "linearscanend",
|
||||
"write", "putenv", "prependenv", "appendenv", "threadvar", "emit",
|
||||
"nostackframe", "implicitstatic"]
|
||||
"nostackframe", "implicitstatic", "global"]
|
||||
|
||||
proc findStr*(a: openarray[string], s: string): int =
|
||||
for i in countup(low(a), high(a)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue