a$(1) = "This is a test of a file parsing algorithm."
a$(2) = "If the word......... Error #1"
a$(3) = "This is the second.. Error #2"
a$(4) = "Here is some more text on a line."
a$(5) = "That concludes this simple presentation"
a$(6) = "To search the word.. Error #3 at position 22 of any line."
' Now we can see if the search term "Error" is at any line #22, even when loading the entire file at once."
i = 0 ' Variable just to keep track of which line has the search term in it...
search$ = "Error"
i = i + 1
IF MID$(a$
, 22, LEN(search$
)) = search$
THEN PRINT i
, a$
' Looks for the word "Error" 22 characters in on any line.