added tools and web dirs

This commit is contained in:
Andreas Rumpf 2009-09-15 23:22:22 +02:00
commit 66a7e3d37c
489 changed files with 4593 additions and 9878 deletions

7
tests/ttempl3.nim Normal file → Executable file
View file

@ -1,12 +1,13 @@
template withOpenFile(f, filename, mode: expr, actions: stmt): stmt =
template withOpenFile(f: expr, filename: string, mode: TFileMode,
actions: stmt): stmt =
block:
var f: TFile
if openFile(f, filename, mode):
if open(f, filename, mode):
try:
actions
finally:
closeFile(f)
close(f)
else:
quit("cannot open for writing: " & filename)