'Program FIGLINKS.BAS (c) 1996 by J. C. Sprott
'This PowerBASIC program adds links to the figures in sabook.htm
cls
name "sabook.htm" as "sabook.bak"
defint a-z
open"sabook.bak" for input as #1
open"sabook.htm" for output as #2
while not eof(1)
input #1, a$
s=instr(a$,"Figure ")
t=instr(s+10,a$," ")
if s>0 and t-s>9 then
if instr(a$,""+b$+"" in a$
print a$
end if
s=instr(a$,"Plate ")
t=instr(s+7,a$," ")
if s>0 and t-s>6 then
if instr(a$,""+b$+"" in a$
print a$
end if
print #2, a$
wend
beep