BUGFIX: better error message when loading of dynamic lib proc fails

This commit is contained in:
Andreas Rumpf
2009-12-09 01:05:48 +01:00
parent f265c3e866
commit 27d7e3a0ae
4 changed files with 45 additions and 14 deletions

14
tests/tsplit.nim Executable file
View File

@@ -0,0 +1,14 @@
import strutils
var s = ""
for w in split("|abc|xy|z", {'|'}):
s.add("#")
s.add(w)
if s == "#abc#xy#z":
echo "true"
else:
echo "false"
#OUT true

16
tests/ttuple1.nim Executable file
View File

@@ -0,0 +1,16 @@
const romanNumbers = [
("M", 1000), ("D", 500), ("C", 100),
("L", 50), ("X", 10), ("V", 5), ("I", 1) ]
var c = 0
for key, val in items(romanNumbers):
inc(c)
stdout.write(key & "=" & $val)
if c < romanNumbers.len: stdout.write(", ") else: echo""
#echo""
proc PrintBiTuple(t: tuple[k: string, v: int]): int =
stdout.write(t.k & "=" & $t.v & ", ")
return 0