diff options
author | Araq <rumpf_a@web.de> | 2012-06-22 08:30:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-06-22 08:30:55 +0200 |
commit | 0b509127d21b3aba735b363d6b8dfeb9b37d1f4d (patch) | |
tree | 9c90de9254e72c8dc9ff4d55141328b44aa8ac0a /lib | |
parent | 05c981ea9b906292063c0b24dd6d387d4e666e8a (diff) | |
download | Nim-0b509127d21b3aba735b363d6b8dfeb9b37d1f4d.tar.gz |
documentation improvements; added system.gorge (for Araq's fun)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/system.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim index fe8f7a517..b57b2fec5 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -1246,7 +1246,9 @@ iterator `||`*[S, T](a: S, b: T, annotation=""): T {. ## `annotation` is an additional annotation for the code generator to use. ## Note that the compiler maps that to ## the ``#pragma omp parallel for`` construct of `OpenMP`:idx: and as - ## such isn't aware of the parallelism in your code. Be careful. + ## such isn't aware of the parallelism in your code! Be careful! Later + ## versions of ``||`` will get proper support by Nimrod's code generator + ## and GC. nil proc min*(x, y: int): int {.magic: "MinI", noSideEffect.} @@ -2214,7 +2216,10 @@ proc staticRead*(filename: string): string {.magic: "Slurp".} ## ## const myResource = staticRead"mydatafile.bin" ## + ## ``slurp`` is an alias for ``staticRead``. +proc gorge*(command: string, input = ""): string {. + magic: "StaticExec".} = nil proc staticExec*(command: string, input = ""): string {. magic: "StaticExec".} = nil ## executes an external process at compile-time. @@ -2225,6 +2230,7 @@ proc staticExec*(command: string, input = ""): string {. ## const buildInfo = "Revision " & staticExec("git rev-parse HEAD") & ## "\nCompiled on " & staticExec("uname -v") ## + ## ``gorge`` is an alias for ``staticExec``. proc `+=`*[T](x, y: ordinal[T]) {.magic: "Inc", noSideEffect.} ## Increments an ordinal |