String Search
Posted: Tue Nov 30, 2004 4:18 am
Hi all
I am reading the Map file created after linking a project to identify the
error
line within a module.
Can somebody enlighten me as to why I cant find a string in another string
when I know that the string is there. (for example 0416:01A9)
I have done all the usual removal of spaces , printed the string to confirm
that the string was in fact retrieved from the file etc.
This is a code snippet.
'First find the file length
MF = FREEFILE
OPEN "Module02.MAP" FOR input AS #MF
FLEN = LOF(MF)
CLOSE #MF
'Next make a blank string equal to the length of the file.
A$ = STRING$(FLEN," ")
'Now get the whole string from the file.
OPEN "Module02.MAP" FOR RANDOM AS #MF LEN = FLEN
GET #MF,,A$
Close #MF
REC = INSTR(A$,Address$)
IF REC > 0 THEN
blah
blah
Regards
Dinasaur
I am reading the Map file created after linking a project to identify the
error
line within a module.
Can somebody enlighten me as to why I cant find a string in another string
when I know that the string is there. (for example 0416:01A9)
I have done all the usual removal of spaces , printed the string to confirm
that the string was in fact retrieved from the file etc.
This is a code snippet.
'First find the file length
MF = FREEFILE
OPEN "Module02.MAP" FOR input AS #MF
FLEN = LOF(MF)
CLOSE #MF
'Next make a blank string equal to the length of the file.
A$ = STRING$(FLEN," ")
'Now get the whole string from the file.
OPEN "Module02.MAP" FOR RANDOM AS #MF LEN = FLEN
GET #MF,,A$
Close #MF
REC = INSTR(A$,Address$)
IF REC > 0 THEN
blah
blah
Regards
Dinasaur