[fpc-devel]Still have problems with arrays...
Jonas Maebe
jonas at zeus.rug.ac.be
Wed Sep 20 10:26:22 CEST 2000
>- In fact the buffer is an array, but only in the program that calls the
>procedure
>- so the procedure does only know the pointer to the buffer and the size
>of it.
>- now I want to move the data within the procedure with an computed offset,
>e.g. move the data at @buffer+offset -> @buffer ... how can this be done?
>- Is there any complementary to the "move"-command that can work with
>pointers?
Just declare a type like
type
pbyte = ^byte;
and do
move((pbyte(buffer)+offset)^,pbyte(buffer)^,size);
Note that you should use buffer instead of @buffer, since you say buffer
is already a pointer.
Jonas
More information about the fpc-devel
mailing list