qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
FillChar Procedure
  Summary Details Example                                   Back
 
  Arguments
 
    variable    Starting location in memory
 
    size        Word expression representing the number of bytes of
                memory to be written
 
    value       Ordinal expression representing the byte or character
                value
 
  Description
 
    The FillChar procedure fills a section of memory with a byte value.
    FillChar copies a specified byte or character to a contiguous
    section of memory without range checking.
 
    The starting location is the address of the first byte of the
    variable argument. It is possible to write to memory beginning at
    any location within an array. To fill memory beginning at an array
    element, pass the indexed array to FillChar:
 
       FillChar( array_name[5], 10, ' ');
 
    The size argument specifies the number of bytes that FillChar
    writes, beginning at the variable. Because FillChar does not perform
    range checking, it is possible to write beyond the boundary of the
    specified variable. Avoid this by using the SizeOf function to
    specify size.
 
    If the variable is a type that is not the size of a byte, the
    values stored may be unexpected. Both bytes of a 2-byte type──or
    all four bytes of a 4-byte type──receive the specified byte value.