Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

250 INSTR in string Purpose To search one string for any occurrence of another string, for example to see if one word contains another specific word. The search normally starts from the beginning of one string but as an option the search can start from a specified point along the string. The number returned is the string position of the second string in the first string. The leftmost character position is position number 1. If no match is found then zero is returned. A search for a null string X=INSTR("Sunday","") will always return 1. Examples puts the position of in into X . 240 X=INSTR(A$,B$) 180 Y=INSTR(A$,B$,Z) starts search at position Z . PRINT INSTR("HELLO","L") would print 3 .

Description A function which returns the position of a sub-string within a string. The starting position for the search may be specified. There must be no space between INSTR and the first parenthesis. Syntax = INSTR ( , [ , ]) Associated keywords LEFT$ , MID$ , RIGHT$ , LEN$