Message46136
Logged In: YES
user_id=971153
An alternative to islastline() would be to add a single-line
look-ahead capability:
nextline() which would return a structure containing
next line, and its file name
(or have 2 functions
nextline()
and nextlinefile()
)
This would cover most of the OP's needs but would also
provide extra useful functionality....E.g. when processing
files which have a
header line
[data line]*
structure
its very convenient to know in advance when section ends
while processing the last line of section not when
enountering the header line of the next section...
Another use case would be processing of files with line groups:
group1line1
group1line2
group1line3
group2line1
group2line2
(grouping could be for example on the value of a certian
field in the line)
again it would be very useful to know when a group ends
while still processing this group
|
|
Date |
User |
Action |
Args |
2007-08-23 15:38:04 | admin | link | issue968063 messages |
2007-08-23 15:38:04 | admin | create | |
|