[Gambas-devel] PEEK method?

Benoit Minisini gambas at ...1...
Fri Nov 14 21:46:56 CET 2003


Le Vendredi 14 Novembre 2003 21:25, Daniel Campos a écrit :
> Hi benoît (and company):
>
>  May be a new PEEK method for standard streams?
>
>  Now we have a READ #file,[str].[length], which moves
> stream pointer to the next character to the last read
> character, so PEEK #file,[str],[length], would be the
> same but keeping the pointer in the same place it
> started.
>
>  It would be quite useful to integrate Peek() method
> from Socket class into standard stream programming.
>
> Regards,
>
> Daniel Campos

Why not ? 

On block devices, this only a matter of seeking the file pointer.
The problem is that on character device peeking needs a buffer, and so that 
the size of the peeked data cannot be greater than the size of the buffer. 

If I have time, I will add it in the 1.0. Else, it will be in a next version.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the Devel mailing list