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.
Pos Function
  Summary Details Example                                   Back
 
  Arguments
 
    substring    String expression to be located
 
    source       String expression to be searched
 
  Returns
 
    Byte         Position within source of first character of
                 substring, or 0 if substring is not in source
 
  Description
 
    The Pos function looks for a substring pattern within a string. If
    the string contains the substring, Pos returns an integer value
    giving the starting position of the substring within the source
    string. If Pos does not find the substring in the source string,
    it returns a zero.
 
      Example Call        Return
      ════════════════    ══════
      Pos( 'B', 'ABC')    2
      Pos( 'B', 'abc')    0