|
Post by Stefan on Oct 31, 2021 5:56:11 GMT -5
Hi George,
Not sure if this is a bug or just a change.
I have used this code construct for ages without issue
SPF_Cmd("FIND R'"+what$+"' FIRST") ' Look for a matching entry WHILE Get_FIND_LPtr > 0 ' Loop over all matches <.......do some stuff here......> SPF_Cmd("FIND R'"+what$+"' NEXT") ' Find the next match WEND ' Until no more matches found Still worked fine in v21186 but fails to terminate/leave the loop in v21289
It turns out that Get_FIND_LPtr used to return 0 whenever the FIND command failed (bottom of data reached), but is now unchanged from whatever it had before.
Simple to fix with the (probably better anyway) code below, but a change/oversight that can catch folks out.
cmdRC = SPF_Cmd("FIND R'"+what$+"' FIRST") ' Look for a matching entry WHILE cmdRC = 0 ' Loop over all matches <.......do some stuff here......> cmdRC = SPF_Cmd("FIND R'"+what$+"' NEXT") ' Find the next match WEND ' Until no more matches found
|
|
|
Post by George on Oct 31, 2021 10:55:39 GMT -5
Stefan: I'll check it out, but I don't recall any changes in those areas.
OK, 21285 had a correction to repair the ZFIND and ZLOC variables, which had been broken. That correction triggered this error.
Corrected. Thanks for spotting it.
George
|
|