[Gambas-user] Error in file read when length is a negative value ?

Vinode Singh Ujlain ujlain at gmail.com
Sun Jan 17 10:03:38 CET 2021


Yes SEEK could help .,. but code becomes longer, I need to read last 5 
bytes from EOF .. I was looking at http://gambaswiki.org/wiki/lang/read?nh

_Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ *here length can be 
+/- , +ive reads from beginning of file and -ive reads backwards from 
EOF. But that is not happening, ERROR ?*



Warm Regards,
Vinode Singh Ujlain
https://www.linkedin.com/in/ujlain/
------------------------------------------------------------------------
On 17/01/21 2:25 pm, Gianluigi wrote:
>
>
> Il giorno dom 17 gen 2021 alle ore 08:39 Vinode Singh Ujlain 
> <ujlain at gmail.com <mailto:ujlain at gmail.com>> ha scritto:
>
>     Please see attached project.
>     *read stream length* returns the same string regardless of + /-
>     length given. As per documentation , a negative length should
>     return characters from end of file
>     -- 
>     Warm Regards,
>     Vinode Singh Ujlain
>     https://www.linkedin.com/in/ujlain/
>     ------------------------------------------------------------------------
>
>     ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
> Hi Vinode,
> are you in search for the Seek key ?
> http://gambaswiki.org/wiki/lang/seek
>
> Regards
> Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210117/041daa55/attachment.htm>


More information about the User mailing list