diff options
author | Araq <rumpf_a@web.de> | 2011-01-29 14:18:43 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-01-29 14:18:43 +0100 |
commit | 36accda8aaef4bd8daaf23e3eb369c2ca540f224 (patch) | |
tree | 39a28c97a100ce26d2bb6a9329811fcc83306a72 /lib/system/sysio.nim | |
parent | f46870fe1ce3a28ab44417effd1c684522568a8d (diff) | |
download | Nim-36accda8aaef4bd8daaf23e3eb369c2ca540f224.tar.gz |
unary <; countup two type parameters; --recursivePath should work now
Diffstat (limited to 'lib/system/sysio.nim')
-rwxr-xr-x | lib/system/sysio.nim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index e342296c7..80d9b1495 100755 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -1,7 +1,7 @@ # # # Nimrod's Runtime Library -# (c) Copyright 2009 Andreas Rumpf +# (c) Copyright 2011 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. @@ -59,11 +59,19 @@ proc write(f: TFile, i: int) = fprintf(f, "%lld", i) else: fprintf(f, "%ld", i) + +proc write(f: TFile, i: biggestInt) = + when sizeof(biggestint) == 8: + fprintf(f, "%lld", i) + else: + fprintf(f, "%ld", i) proc write(f: TFile, b: bool) = if b: write(f, "true") else: write(f, "false") proc write(f: TFile, r: float) = fprintf(f, "%g", r) +proc write(f: TFile, r: biggestFloat) = fprintf(f, "%g", r) + proc write(f: TFile, c: Char) = putc(c, f) proc write(f: TFile, a: openArray[string]) = for x in items(a): write(f, x) |