Re: [fpc-pascal] Using Move() with dynamic arrays -> RunError(0)

2009-12-08 Thread Žilvinas Ledas
Marco van de Voort wrote: The move also tries to take the address element 0 for arrays when they are 0. The for loop doesn't execute in that case. Thanks! Didn't thought about that. Regards, Žilvinas ___ fpc-pascal maillist - fpc-pascal@lists

Re: [fpc-pascal] Using Move() with dynamic arrays -> RunError(0)

2009-12-08 Thread Marco van de Voort
In our previous episode, ??ilvinas Ledas said: > > function TFrame.getAllFrame(): TArrayOfSmallInt; > var > tmpBuf: TArrayOfSmallInt; > i: Integer; > begin > startOverlapLen := Length(startOverlap); > mainAreaLen := Length(mainArea); > endOverlapLen := Length(endOverlap); > > SetLengt

[fpc-pascal] Using Move() with dynamic arrays -> RunError(0)

2009-12-08 Thread Žilvinas Ledas
Hello all, I'm trying to use Move() with dynamic arrays, but don't know why it fails... When instead commented out "for .. do" code I use Move() code my app gets RunError(0) after some time. When I use "for .. do" everything works ok. I'm using Free Pascal Compiler version 2.3.1 [2009/11/03] f