FillChar(Values,SizeOf(Values),0)
That worked.
However, for an integer is fillword better?

A "fillword" procedure does not exist. FillChar is an anchient Pascal function to simply fill any arbitrary memory location of any size (determined by a variable) with all the same byte. It is very fast but there is no type checking at all (you can fill any type of variable) and I think there is no range checking either. So you should use SizeOf() to give the number of bytes to be written but in special circumstance you can also use a different value.

A similar procedure is move, which copies bytes from one memory location to another (again both determined by variables) also without type and range checking.

Ju"rgen Hestermann.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to