[futurebasic] Re: [FB] BLOCKMOVE Does What Now???

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

From: Rick Brown <rbrown@...>
Date: Sun, 31 Oct 1999 15:38:24 -0600

Richard Phillips wrote:

>
>     I've got a question about the guts of BLOCKMOVE that I'm hoping someone
> might be able to clear up for me.
>
>     Obviously BLOCKMOVE works pretty well when you're moving a bunch of bytes
> from here to way over there.  But what if I need to slide a given block of
> bytes only a few positions forward or backward of their original address?

Never fear: BLOCKMOVE is smart enough to work without error even if the source and
destination ranges overlap.  The following demonstrates this:

msg$ = "My name is Rick"
n = LEN(msg$) + 1
PRINT msg$
BLOCKMOVE @msg$, @msg$+1,n
PRINT PSTR$(@msg$+1)
BLOCKMOVE @msg$+1, @msg$, n
PRINT msg$