Well, your expectation certainly matches mine.  I don't believe the
implementation of this has been touched in any of the releases, so it
might very well be buggy.

Rick

On Tue, May 12, 2009 at 2:27 PM, Mark Miesfeld <miesf...@gmail.com> wrote:
> In the documentation for .Stream~supplier, it says:
>
> Returns a Supplier object for the stream containing the remaining
> stream lines and linenumber positions
> for the stream.
>
> Containing the *remaining" stream lines, led me to expect that after
> reading 3 lines of a 18 line file,  and then getting a supplier
> object, the supplier object would only have the last 15 lines.
> Instead it has all 18 lines.
>
> This seems wrong, unless the documentation is wrong.  It seems logical
> to me that the supplier would only have the remaining lines.  ??
>
> Here's a short example pulled from the test case I was writing:
>
>  fileName = "delMe.stream.supplier"
>  'del' fileName '> nul 2>&1'
>
>  f = .stream~new(fileName)
>  do i = 1 to 18
>    f~lineout('cat and dog' i)
>  end
>  f~close
>
>  fsObj = .stream~new(fileName)
>
>  count = 0
>  do 3
>    count +=1
>    l = fsObj~linein
>  end
>
>  itr = fsObj~supplier
>
>  do while itr~available
>    count += 1
>    i = itr~index
>    say 'i:' i
>    itr~next
>  end
>  say 'count:' count
>
> I expected count to be 18, but instead it is 21.  Putting the 'say' in
> shows that all line numbers are present in the Supplier object.
>
> C:\work.ooRexx\ooTest\4.0.0>qTest.rex
> i: 1
> i: 2
> i: 3
> i: 4
> i: 5
> i: 6
> i: 7
> i: 8
> i: 9
> i: 10
> i: 11
> i: 12
> i: 13
> i: 14
> i: 15
> i: 16
> i: 17
> i: 18
> count: 21
>
> 3.2.0 does the same thing, expect it generates an error.  So there is
> an old bug there:
>
> Z:\ooTest\4.0.0>qTest.rex
> i: 1
> i: 2
> i: 3
> i: 4
> i: 5
> i: 6
> i: 7
> i: 8
> i: 9
> i: 10
> i: 11
> i: 12
> i: 13
> i: 14
> i: 15
> i: 16
> i: 17
> i: 18
>    27 *-*   itr~next
> Error 34 running
> C:\work.ooRexx\3.x\interpreter.3.2.0\trunk\Win32Rel\StreamClasses.orx
> line 404:  Logical value not
> 0 or 1
> Error 34.1:  Value of expression following IF keyword must be exactly
> "0" or "1"; found "CLOSE"
>
> Z:\ooTest\4.0.0>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to