I wrote:
George Shapovalov wrote:
In Borland Pascal you would use
fillchar(var x;value:word [size:word]);
so the invoking would look exactly like your example:
fillchar(x,0,sizeOf(x));
However with BP you can do it to the <64K in size variables (as this is a maximal size for "regular" variable in BP). Does this work for gpc as well?
Yes (without the 64KB limit, of course).
However, the order of parameters is different (in BP and GPC):
Maybe that was unclear -- I didn't mean to say that it's different in BP and GPC, but rather it's the same in BP and GPC, but different from what was stated above. (Just pointing this out because there are prople who try to see incompatibilities between BP and GPC where there are none...). So the following syntax is for both BP and GPC:
procedure FillChar (var Dest; Count: SizeType; Val: Char); or procedure FillChar (var Dest; Count: SizeType; Val: Byte);
Frank