[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

FillChar

Fill memory region with certain character

Declaration

Source position: line 0

procedure FillChar(

  var x;

  count: SizeInt;

  Value: Boolean

);

procedure FillChar(

  var x;

  count: SizeInt;

  Value: Char

);

procedure FillChar(

  var x;

  count: SizeInt;

  Value: Byte

);

Description

Fillcharfills the memory starting at Xwith Countbytes or characters with value equal to Value.

Errors

No checking on the size of Xis done.

See also

Fillword

  

Fill memory region with 16-bit pattern

Move

  

Move data from one location in memory to another

FillByte

  

Fill memory region with 8-bit pattern

FillDWord

  

Fill memory region with 32-bit pattern

Example

Program Example25;

{ Program to demonstrate the FillChar function. }

Var S : String[10];
    I : Byte;
begin
  For i:=10 downto 0 do
    begin
    { Fill S with i spaces }
    FillChar (S,SizeOf(S),' ');
    { Set Length }
    SetLength(S,I);
    Writeln (s,'*');
    end;
end.