Menu

#922 Lines returning 0 when it should not

v4.0.1
closed
5
2012-08-14
2010-08-06
mdlueck
No

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

Discussion

  • mdlueck

    mdlueck - 2010-08-06

    Oh, I should have mentioned, this is when reading from STDIN.

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-08-08

    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.

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-08-09

    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.

     

Anonymous
Anonymous

Add attachments
Cancel