Split is Behaves Unexpectedly?

Sivakatirswami katir at hindu.org
Mon Feb 18 13:43:10 EST 2008


I dunno... I will submit this to the Omniscient Revolution Users List

Some wizard will know...

-------
Namaste, Swami

This is either a bug report, or, the split comand has changed?  Do you 
still have a copy of the old "mc" ?

Running the identical program on my old "mc" interpreter at work, versus 
running it on the "revolution" interpreter on vel, I get the correct 
results at work, and incorrect results on vel.

Aum Aum

*_Vel:


_*------------
code
------------
#!/usr/local/bin/revolution

on startup
     read from stdin until empty
     put it into testdata

     repeat for each line thisline in testdata
          split thisline by "|"
          put thisline[1]
          put thisline[2]
          put thisline[3]
     end repeat

end startup
------------
data
------------
1|2|3|4
5|6|7|8
9|10|11|23
------------
results
------------
1
2
3
9
10
11


*_Work


_*

code
..........
#!/usr/local/bin/mc

on startup
     read from stdin until empty
     put it into testdata

     repeat for each line thisline in testdata
         
split thisline by "|"
          put
thisline[1]
          put
thisline[2]
          put
thisline[3]
     end repeat

end startup
..........
data
..........
1|2|3|4
5|6|7|8
9|10|11|23
..........
results
..........
1
2
3
5
6
7
9
10
11








More information about the Use-livecode mailing list