In article , John Larkin wrote: [....]
You should use the more modern "COME FROM" statement.
BTW: Any GOTO riddled code can have all of its GOTOs removed by a simple process:
Make the whole code section into a "while" loop around a "switch" statement. The index of the "switch" statement gets modified by each case to select the next statement. The exit is done by changing the variable in the "while" statement.
Start with:
if (a > b) then goto Line1 a = a-b Line1: something(a) exit
end up with:
while KeepGoing switch Index case 0: if (a > b) then Index=2 else Index=1 case 1: a = a-b; Index=2 case 3: something(a); Index=4 case 4: KeepGoing = FALSE end switch end while
This is obviously a process that could be automated.