[fpc-pascal] FillWord with dynamics array.

Luis Fernando Del Aguila Mejía luis3000 at ec-red.com
Thu May 26 23:18:00 CEST 2011


How fill of the same value a dynamic array?

{$codepage utf8}
Var A,B:array of word;
       i:integer;
Begin
   SetLength(A,10);
   SetLength(B,10);

   FillWord(A[0],2*10,0);  //when value diferent to zero, no runtime error
   FillWord(B[0],2*10,0);

   for i:=0 to 9 do Writeln(i,A[i]:3,B[i]:3);

End.

thanks.



More information about the fpc-pascal mailing list