I have encountered an odd error with the Lines BIF in ooRexx 4.0.1 both the 32/64 bit versions at least on Ubuntu Linux.
I am running the official .deb packages. Host OS's are Ubuntu 9.04 x32 and Ubuntu 8.04 x64.
Lines in 4.0.1 returns 0 even if there is a line to read. On 3.2 it correctly returns 1 when there is data to read.
Trace of the problem in 4.0.1:
193 - somelines = Lines( input ) ;
194 - say somelines
0
196 - DZ = LineIn( input ) ;
197 - say DZ
dada-backup.sh complete! RC=0
Working example with 3.2:
193 - say somelines
>V> SOMELINES => "1"
>>> "1"
1
194 - DZ = LineIn( input ) ;
>V> INPUT => "STDIN:"
>A> "STDIN:"
>F> LINEIN => "dada-backup.sh complete! RC=0"
>>> "dada-backup.sh complete! RC=0"
195 - say DZ
>V> DZ => "dada-backup.sh complete! RC=0"
>>> "dada-backup.sh complete! RC=0"
dada-backup.sh complete! RC=0
Anonymous
Oh, I should have mentioned, this is when reading from STDIN.
Was fixed in trunk, revision 5744, but not commited to 4.0.1 (by decision)
Interpreter does not provide STDIN in pipeline - ID: 2975571
http://sourceforge.net/tracker/?func=detail&aid=2975571&group_id=119701&atid=684730
See also similar defect declaration (I think)
lines() returns 0 prematurely for pipes on unix - ID: 3017541
http://sourceforge.net/tracker/?func=detail&aid=3017541&group_id=119701&atid=684730
See also
http://sourceforge.net/mailarchive/forum.php?thread_name=16b57be91003260134i69c636dfu691d0514f873536a%40mail.gmail.com&forum_name=oorexx-devel
If this is fixed, we should close it as a duplicate.
Michael, if you would provide a simple test program with your bugs, it makes them a lot easier to deal with. For instance, I could quickly test if your problem is indeed fixed in trunk.
We believe this is fixed in trunk by the 5744 comit, so I'm closing it as out of date.
Michael, if you send a test program to my g mail account, I'll double check that it is indeed fixed.