Re: [fpc-pascal] unit system; procedure move();
jonas.maebe at elis.ugent.be
Mon Mar 17 12:40:51 CET 2008
On 17 Mar 2008, at 12:34, fpc at xgelb.de wrote:
> I need more informations about the move() procedure form unit system.
> I want to shift an array (values:array[0..Maximum-1] of single) like
> following lines:
> for i:=Maximum-1 downto 1 do values[i]:=values[i-1];
> I found the move procedure (unit system) and wrote this lines:
> I would use the move procedure, because the move procedure is very
> The program runs very well with move, but I would avoid access
> violations in
> future. That are the reasons of my questions:
> Is the use of the move procedure right? The array length is
> Maximum-1. When I
> put this length on value, the last entry value[Maximum-1] would
> be deleted
> or would be shifted in an different memory area?
It would overwrite whatever is placed in memory after the array
(which, in case there is nothing, indeed causes an access violation).
Use this instead:
More information about the fpc-pascal