advr.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
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 INSTR([start%,] stringexpression1$, stringexpression2$)
 
 Usage Notes
   ■ The arguments stringexpression1$ and stringexpression2$ can be string
     variables, string expressions, or string literals.
 
   ■ Use the LEN function to find the length of stringexpression1$.
     See: ◄LEN Function►
 
   ■ The value returned by INSTR depends on the following conditions:
 
     Condition                           Return Value
     ══════════════════════════════════  ═══════════════════════════════════
     stringexpression2$ found in         Position at which the match is found
     stringexpression1$
 
     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