Skip to content
Andrew Owen edited this page May 25, 2023 · 1 revision

INSTR


position = INSTR([start,] parent, chlid)

Returns the location of the first occurrence of the substring chlid in parent.

Parameters

  • parent and child are string expressions.
  • start is a numeric expression in [1 to 255], specifying the starting position from where to look; if not specified, the search starts at character 1.

Notes

  • If child is not a substring of parent occurring at or before start, INSTR returns 0.
  • If the start index is 0 (instead of 1), it still searches from the beginning.
  • If child is empty, it is found right away at the start index.

Errors

  • start has a string value or parent or child have numeric values: Type mismatch
  • start is not in [-32768 to 32767]: Overflow.
  • start is not in [1 to 255]: Illegal function call.

Welcome to the SE BASIC wiki


  • Press RETURN to return to this menu.
  • Enter the name of a TOPIC to display it.
  • Enter EXIT to return to BASIC.

Choose from the following topics:

  1. Quick start guide: QUICK
  2. User's guide: USER
  3. Configuration guide: CONFIG
  4. Language guide: LANGUAGE
  5. Language reference: BASIC
  6. Technical reference: TECH
  7. Developer's guide: DEV
  8. Acknowledgemets: CREDITS
  9. Licenses: LICENSE
Clone this wiki locally