added tools and web dirs
This commit is contained in:
parent
300430fbba
commit
66a7e3d37c
489 changed files with 4593 additions and 9878 deletions
7
tests/ttempl3.nim
Normal file → Executable file
7
tests/ttempl3.nim
Normal file → Executable 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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue