diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2009-05-08 16:36:06 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2009-05-08 16:36:06 +0200 |
commit | db4f617afcd095db087dcb52e3ea603cca111da7 (patch) | |
tree | eeffcc8fb523171dc394c136acf9b8006ec4138f /lib/sysio.nim | |
parent | 08bc9ac03c49db7bfcdee82f46aadf95a324e015 (diff) | |
download | Nim-db4f617afcd095db087dcb52e3ea603cca111da7.tar.gz |
version 0.7.8
Diffstat (limited to 'lib/sysio.nim')
-rw-r--r-- | lib/sysio.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sysio.nim b/lib/sysio.nim index d79b5e287..bd52ef5ea 100644 --- a/lib/sysio.nim +++ b/lib/sysio.nim @@ -1,7 +1,7 @@ # # # Nimrod's Runtime Library -# (c) Copyright 2006 Andreas Rumpf +# (c) Copyright 2009 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. @@ -54,7 +54,12 @@ proc readLine(f: TFile): string = rawReadLine(f, result) proc write(f: TFile, s: string) = fputs(s, f) -proc write(f: TFile, i: int) = fprintf(f, "%ld", i) +proc write(f: TFile, i: int) = + when sizeof(int) == 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") |