[futurebasic] Re: [FB] a few FBtoC questions -- more text stuff

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

From: Brian Stevens <bstevens33@...>
Date: Sat, 20 Sep 2008 08:17:59 -0700
On Sep 20, 2008, at 8:02 AM, Brian Stevens wrote:

>
> On Sep 19, 2008, at 9:18 PM, Mark Chappell wrote:
>
>> The text in question is written to the end of the data file from  
>> the container (called 'CommentContainer') as:
>>
>> print #3,CommentContainer;
>>
>> and read from the file as:
>>
>> input #2,CommentContainer
>>
>> It is not stored with an indicator of the number of bytes of text.
>>
>> This is at the end of a long file consisting of a big single- 
>> precision float data array that is put into the file with WRITE  
>> FILE #  and read from the file with READ FILE #.  THere are also  
>> some additional single- precision floats at the beginning of the  
>> file and at the end, just before the text from the container.
>>
>> Thanks, Mark Chappell
>>
>
>
> Ditto what Robert P. said. My comment about containers was only a  
> personal preference.
>
> Brian

Here is snippet to show how to get the pointer for the underlying  
container. The pointer could then be used in the TXNSetData call to  
put the text in the scrolling text field. No time right now for more.


'---------
dim as container gC
dim as pointer   p

gC = "this is a test" // 14 characters

p = [[@gC]]

print fn GetPtrSize( p )

do
handleevents
until gFBquit
'----------------------


Brian S