FillChar

From Delphi Pascal wiki
Jump to navigation Jump to search

Fills a specified number (Count) of contiguous bytes with a specified value (can be type Byte or Char).

Declaration
procedure FillChar(var X; Count: Word; value);
Target
Windows, Real, Protected
Remarks
This function does not perform any range-checking.
See Also
Move


Sample Code

{Fillchar.PAS}
{Sample code for the FillChar procedure.}

var
  S: string[80];
begin
  { Set a string to all spaces }
  FillChar(S, SizeOf(S), ' ');
  S[0] := #80;  { Set length byte }
end.