bas7advr.hlp (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.
INSTR Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
INSTR returns the character position of the first occurrence of a string in
another string.
 
INSTR([start%,]stringexpression1$,stringexpression2$)
    ■ The arguments stringexpression1$ and stringexpression2$ can be string
      variables, string expressions, or string literals.
 
Usage Notes
    ■ The value returned by INSTR depends on the following conditions:
 
        Condition                           Value returned
        ═════════════════════════════       ═════════════════════════
        stringexpression2$ found in         The position at which the
        stringexpression1$                  match is found
 
        start% greater than length of       0
        stringexpression1$
 
        stringexpression1$ is null string   0
 
        stringexpression2$ cannot be found  0
 
        stringexpression2$ is null string   start% (if given); otherwise, 1
 
    ■ Use the LEN function to find the length of stringexpression1$.