10 REM PC-BASIC test
20 REM INSTR function
30 OPEN "OUTPUT.TXT" FOR OUTPUT AS 1
40 ON ERROR GOTO 10000
50 PRINT#1, INSTR
60 PRINT#1, INSTR(
70 PRINT#1, INSTR("ABC"
80 PRINT#1, INSTR(1
90 PRINT#1, INSTR(1.5
100 PRINT#1, INSTR(-1)
110 PRINT#1, INSTR(1)
120 PRINT#1, INSTR(-1.5)
130 PRINT#1, INSTR(1.5)
140 PRINT#1, INSTR(-1.5D2)
150 PRINT#1, INSTR(1.5D2)
160 PRINT#1, INSTR("ABC")
200 PRINT#1, INSTR(0)
210 PRINT#1, INSTR(256)
220 PRINT#1, INSTR(32768)
230 PRINT#1, INSTR(65536)
240 PRINT#1, INSTR(1.701412E+38)
250 PRINT#1, INSTR(1.701411834604692D+38)
300 PRINT#1, INSTR(1)
310 PRINT#1, INSTR(#1)
320 PRINT#1, INSTR(1, 1)
330 PRINT#1, INSTR(1, 1, 1)
340 PRINT#1, INSTR(1, 1, 1, 1)
1000 PRINT#1, INSTR("ABCD", "BC")
1010 PRINT#1, INSTR("ABCD", 1)
1020 PRINT#1, INSTR(2, "ABCD", "BC")
1030 PRINT#1, INSTR("E", "ABCD", "BC")
1040 PRINT#1, INSTR(0, "ABCD", "BC")
1050 PRINT#1, INSTR(-1, "ABCD", "BC")
1060 PRINT#1, INSTR(10, "ABCD", "BC")
1070 PRINT#1, INSTR(0, "ABCD", "BC")
1080 PRINT#1, INSTR(256, "ABCD", "BC")
1090 PRINT#1, INSTR("", "A")
1100 PRINT#1, INSTR("A", "")
1110 PRINT#1, INSTR("","")
2090 PRINT#1, INSTR(1, "", "A")
2100 PRINT#1, INSTR(1, "A", "")
2110 PRINT#1, INSTR(1, "","")
9999 END
10000 PRINT#1, ERR, ERL
10010 RESUME NEXT
