rev 367 - trunk/pr

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-04-16 02:58:41 -0400 (Fri, 16 Apr 2004)
New Revision: 367

Added:
   trunk/pr/listcomp.pr
Log:
list comprehension implemented but only works for
simplest case, such as: print [x for x in 4],
added listcomp.pr test file

Added: trunk/pr/listcomp.pr
===================================================================
--- trunk/pr/listcomp.pr	2004-04-16 06:56:07 UTC (rev 366)
+++ trunk/pr/listcomp.pr	2004-04-16 06:58:41 UTC (rev 367)
@@ -0,0 +1,16 @@
+#!/usr/bin/env prothon
+
+# listcomp.pr
+
+print
+print "The following line should be [0, 1, 2, 3]"
+print
+print [x for x in 4]
+print
+/*
+print
+print "The following line should be [(0, 0), (0, 1), (1, 0), (1, 1)]"
+print
+print [(x,y) for x in 2 for y in 2]
+print
+*/
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.