VMS Help
PASCAL, Predeclared Routines, Char Strng, INDEX

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  The INDEX function searches a string for a  specified  substring
  and  returns an integer value that either indicates the location
  of the substring or the status of the search.

  Syntax:

     INDEX( string, substring )

  INDEX requires two character-string expressions  as  parameters:
  a string to be searched and a substring to be found.

  The search ends as soon as the first occurrence of the substring
  is located.  If the substring is found, INDEX returns the string
  component that contains the first letter of the  substring.   If
  the  substring  is not found, INDEX returns the value 0.  If the
  substring is an empty string, INDEX returns the value 1.  If the
  string  to  be  searched  is  an empty string, INDEX returns the
  value 0 unless the substring is also empty; in which case, INDEX
  returns the value 1.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.