[futurebasic] Re: [FBtoC] Help needed with translation from old future Basic

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2006 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Tue, 14 Nov 2006 22:45:32 -0600
On Nov 14, 2006, at 9:32 PM, Robert Purves wrote:
> But consider this less fortunate case:
> dim as long  myLongArray(999)
>    write file #1, @myLongArray(0), 1000*sizeof( long )
>   // disk format is big-endian on PPC, litle-endian on Intel;  
> numbers will be wrong if read by the other platform
>    read  file #1, @myLongArray(0), 1000*sizeof( long )

I gather you have rejected my proposal that all values in FBtoC  
remain big-endian until needed in little-endian format, then swapped  
on the fly. I still think that is the way to go, completely avoiding  
messes like you have indicated here.

As an alternative, I could see keeping an indicator bit in a variable  
info record to indicate the current endian status of any var, but I  
think all arrays should definitely be big-endian at all times.


   =J= a  y