[futurebasic] Re: [FB] Reading carriage returns

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2003 : Group Archive : Group : All Groups

From: Barrie <barrie@...>
Date: Wed, 24 Sep 2003 10:43:39 -0400
>> If an edit field contains two lines of Text and the lines are separated by a
>> CR, how should I save and read? Reading with Input# or Line Input# will not
>> read all of the original text since a CR terminates the operation. Is Write#
>> and Read# the best solution? If so, should the length of the string be saved
>> so it can be used with Read# ?
>> Thanks
>> Barrie
> 
> Barrie,
> 
> Personally, I would use WRITE FIELD and READ FIELD, but if your needs
> can guarantee you'll never have over 255 chars, then WRITE# and READ#
> can work.
> 
> If that's the route you choose, yes, I would save the length byte so
> you can use READ#.
> 
> e-e
> =J= a  y
>  "
Thank you Jay for the advice. I'm now using READ# and WRITE# for < 255
characters. 
I can probably send and retrieve a container$$ to/from disc using WRITE
FIELD and WRITE FIELD if the EDIT FIELD is active, but how do I save and
retrieve a container$$ (with CR's) when the EDIT FIELD is not available? A
container example on the CD shows the use of PRINT# / INPUT# but I don't
think it will work properly with embedded CR's. WRITE# container$$;lenByte
produces a compile error.
Barrie