[futurebasic] Shifting Strings In Memory

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: GBeckman <GBeckman@...>
Date: Sat, 13 Dec 1997 19:13:19 EST
Big news.  Beckman does think about something besides volRefNum%!

I am trying to gain file compatiblity between my Mac (FB) app and Windows

Both compilers allow a block save to disk and they are quick.  I have some
string arrays.  If I make my String Vars odd, then the Mac length byte makes
it even, no pad byte is needed and so the string/memory size is identical.  

Then we get to the fact that Mac puts the length byte at the the beginning and
Delph (PC) puts the length byte at the end of the string.

On the onset I planned to parse and copy the string arrays.  Then I thought:
Why couldn't I just allocate the entire block+1, move everything into the new
one, one byte to the right, paste on length the in the extra byte space, and
have it the whole array converted?  (Some arrays are two dimentional)

Trouble is, I am not sure I know how to do that.  Anyone have something like
Is it worth it?  I have already loaded a block and done some parsing and it is
fairly fast.

Thanks in advance,