version 0.7.6

This commit is contained in:
Andreas Rumpf 2009-04-22 16:12:19 +02:00
commit 08bc9ac03c
29 changed files with 5926 additions and 0 deletions

15
tests/ttempl3.nim Normal file
View file

@ -0,0 +1,15 @@
template withOpenFile(f, filename, mode: expr, actions: stmt): stmt =
block:
var f: TFile
if openFile(f, filename, mode):
try:
actions
finally:
closeFile(f)
else:
quit("cannot open for writing: " & filename)
withOpenFile(txt, "ttempl3.txt", fmWrite):
writeln(txt, "line 1")
txt.writeln("line 2")