#COMPILE EXE "s13_instr.exe"
' Sample: INSTR search function
FUNCTION PBMAIN() AS LONG
    DIM s AS STRING, pos AS LONG
    s = "The quick brown fox"
    pos = INSTR(s, "brown")
    PRINT "String: "; s
    PRINT "brown found at position:"; pos
    pos = INSTR(1, s, "quick")
    PRINT "quick found at position:"; pos
    pos = INSTR(s, "xyz")
    PRINT "xyz found at position:"; pos; " (0 = not found)"
    FUNCTION = 0
END FUNCTION
