REXX: LINES() and "complete lines" 
Author Message
 REXX: LINES() and "complete lines"

In this posting I ask a question about REXX in general and one about
a specific implementation. But the two are closely related; that's why
I'm crossposting to comp.lang.rexx and to comp.os.os2.programmer.misc.

"The REXX Language - Second Edition" says that LINES(name) returns the
number of "complete lines" currently remaining in the input stream name.
What is a complete line in this context?

My common sense tells me that if the read position is somewhere in the
middle of the last line of a file, there are no more complete lines
available, and LINES(file) should return 0.

Under OS/2 2.1, the built-in REXX interpreter (it's version string is
"REXXSAA 5.00 08 Jul 1992") "thinks" differently. If the read position
is somewhere in the middle of the last line of a file, LINES(file) still
returns 1. It only returns 0 (while CHARS() still returns a postitive
value) if the read position is 1 character before the end of the file.
This even is the case when the last line of the file isn't terminated by
a line end sequence. This seems to be a bug. Can anyone confirm this?

Horst
 - - - - - - - - - - - - - - - - - - - - - - -



Tue, 30 Apr 1996 01:08:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. "Tracks" when moving lines

2. Error#3:"memory.cpp"line 563 Labview version 6.1

3. LabView 5.1.1, 'Failure: "linker.c", line 1825': Please Help

4. Failure : "load.cpp", line 4081

5. Failure : "resource.cpp", line 2477

6. POINTLESS OBSERVATION: "Forth" in subject line

7. Error: "memory.cpp in line 876"

8. Failure : "datatype.cpp", line 4200

9. Failure: "datatype.c". line 2872

10. Failure "osupport.cpp" line 4163

11. Failure : "image.cpp", line 11472

12. "image.cpp", line 10060 error on startup

 

 
Powered by phpBB® Forum Software