[M3devel] Rd.GetText Question

Ken Durocher kcdurocher at gmail.com
Sat Jul 9 04:44:24 CEST 2011


The Rd interface defines GetText as GetText(rd: T; len: CARDINAL): TEXT;

I've noticed in different values for len in different places.  Some use
Rd.Length(rd) while others use LAST(CARDINAL).

The latter would limit the text to about 2GB on a 32bit system, correct? But
does Rd.Length() always know what the length will be?

The interface for Rd states this for Rd.Length():
 "If len(rd) is unknown to the implementation of an intermittent reader,
Length(rd) returns -1."

So my question is, which should I use? Another option would be reading in
some arbitrary amount and then looping until EOF. Which method is best?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110708/b417d00f/attachment-0001.html>


More information about the M3devel mailing list