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.
Copy Function
  Summary Details Example                                   Back
 
  Arguments
 
    source           String expression
 
    index            Integer expression in the range 1..255 for the
                     beginning position in source
 
    size             Integer expression for the number of characters to
                     be copied
 
  Returns
 
    <string type>    Substring starting from the index in source, with
                     length of size characters
 
  Description
 
    The Copy function returns a substring of the source string. The
    substring begins at the location in the source given by the index
    argument. It has a length specified by the size argument.
 
    If index is greater than the size of source, Copy returns an
    empty string.
 
    If the length as given by size would extend the substring beyond
    the end of the source string, Copy returns only the available
    characters of the source.
 
    To copy from the beginning of a string, specify index 1, as in
 
       result := Copy( source, 1, size );