diff options
author | Araq <rumpf_a@web.de> | 2014-02-14 02:02:01 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-14 02:02:01 +0100 |
commit | 896c96134f47945c497a1a9f38d3d28ca43f119a (patch) | |
tree | d0f24c826854d187b73a3269f2feaa5241f37d80 /examples | |
parent | a5efe849212162f1b52e4e5257c5cce14938ecbb (diff) | |
download | Nim-896c96134f47945c497a1a9f38d3d28ca43f119a.tar.gz |
fixes #892
Diffstat (limited to 'examples')
-rw-r--r-- | examples/htmltitle.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/htmltitle.nim b/examples/htmltitle.nim index f3c672382..a3280bb13 100644 --- a/examples/htmltitle.nim +++ b/examples/htmltitle.nim @@ -4,10 +4,10 @@ import os, streams, parsexml, strutils -if paramCount() < 1: +if paramCount() < 1: quit("Usage: htmltitle filename[.html]") -var filename = addFileExt(ParamStr(1), "html") +var filename = addFileExt(paramStr(1), "html") var s = newFileStream(filename, fmRead) if s == nil: quit("cannot open the file " & filename) var x: TXmlParser @@ -23,13 +23,13 @@ while true: title.add(x.charData) x.next() if x.kind == xmlElementEnd and cmpIgnoreCase(x.elementName, "title") == 0: - Echo("Title: " & title) + echo("Title: " & title) quit(0) # Success! else: echo(x.errorMsgExpected("/title")) of xmlEof: break # end of file reached - else: nil # ignore other events + else: discard # ignore other events x.close() quit("Could not determine title!") |