On Thursday 19 January 2017 22:50:36 fredvs wrote: > function array_in_out(arrayin: TArFloat): TArFloat; > begin > result := arrayin; > end; > Do you change items of "arrayin" later? If so the items of the result array will be changed too, dynamic array assignment copies the data pointer only. http://www.freepascal.org/docs-html/current/ref/refsu15.html#x39-520003.3.1
Use " function array_in_out(arrayin: TArFloat): TArFloat; begin result:= copy(arrayin); end; " if the result array must be independent. Martin _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal