[Mumps2Py:] with the latest changes...

[ Thread Index | Date Index | More lists.mumps2py.org/discuss Archives ]


Mumps2Py now converts:
FOR i=1:1:5 WRITE !,$A("HOWDY",i)
FOR i=1:1:5 WRITE !,$E("HOWDY",i),":",$A($E("HOWDY",i,5))
FOR i=1:1:5 DO
.. WRITE !,$E("HOWDY",i,5),":"
.. FOR j=i+1:1:6 WRITE $A($E("HOWDY",i,5),j-i),","

to:
# .\out\for_ascii_f.py
# translated from C:/projects/mumps2py/trunk/testfiles/for_ascii_f.mps
# by Mumps2Py

for i in range(1, 6):
 print "\n", ord("HOWDY"[i-1]),
for i in range(1, 6):
 print "\n", "HOWDY"[i-1], ":", ord("HOWDY"[i-1:5][0]),
for i in range(1, 6):
 print "\n", "HOWDY"[i-1:5], ":",
 for j in range((i + 1), 7):
     print ord("HOWDY"[i-1:5][(j - i)-1]), ",",


which yields the following output:

72
79
87
68
89
H : 72
O : 79
W : 87
D : 68
Y : 89
HOWDY : 72 , 79 , 87 , 68 , 89 ,
OWDY : 79 , 87 , 68 , 89 ,
WDY : 87 , 68 , 89 ,
DY : 68 , 89 ,
Y : 89 ,


Cheers,
-Patrick


---


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/