rev 531 - in trunk: include/prothon pr/test
SVN User <[email protected]> Fri, 21 May 2004 17:01:26 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-05-21 17:01:23 -0400 (Fri, 21 May 2004)
New Revision: 531
Modified:
trunk/include/prothon/prothon.h
trunk/pr/test/test.pr
Log:
working on broken dictionary access
Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h 2004-05-21 19:29:14 UTC (rev 530)
+++ trunk/include/prothon/prothon.h 2004-05-21 21:01:23 UTC (rev 531)
@@ -8,7 +8,7 @@
* and the Individual or Organization ("Licensee") accessing and otherwise
* using Prothon software in source or binary form and its associated
* documentation.
- *
+ *
* 2. Subject to the terms and conditions of this License Agreement, HCA
* hereby grants Licensee a nonexclusive, royalty-free, world-wide license
* to reproduce, analyze, test, perform and/or display publicly, prepare
Modified: trunk/pr/test/test.pr
===================================================================
--- trunk/pr/test/test.pr 2004-05-21 19:29:14 UTC (rev 530)
+++ trunk/pr/test/test.pr 2004-05-21 21:01:23 UTC (rev 531)
@@ -1,18 +1,24 @@
#!/usr/bin/env prothon
+d={}
+max = 50
-# Prothon source file tut18.pr
+def Key(n):
+ return "B%02i" % n
-def func():
- for i in 4:
- print i, 1/(i-2)
-
-try:
- func()
-
-except Exception, err:
- print "Exception:", err
+print "Loading dictionary ..."
-print
+for n in max:
+ d[Key(n)] = True
-func()
+print "\nChecking dictionary ..."
+lost = False
+for n in max:
+ if Key(n) not in d:
+ lost = True
+ print "Key %s not found" % Key(n)
+
+if lost:
+ print d.keys().sort!()
+else:
+ print "\ntest passed"