Using the _GPA_SAVE & _GPA_REST & using ASGNFT to assign the font as suggested in a above post:
It reported an error "subscript a non-array variable" on the line 19 (calling out the helios_bold_con font) and program failed compilation.
I received 2 linking errors when I tried to link.
In _GPA_SAVE called from test_program. Wrong number of argumnets _GPA_SAVE
In _GPA_REST called from test_program. Wrong number of
arguments _GPA_REST
----------------------------------------------
Here are the sub-routines:
$****************_GPA_SAVE.GRS****************
Proc/ Gpavlu
Number/ Gpavlu(43)
Gpavlu(1) = &Apsite
Gpavlu(2) = &Aunit
Gpavlu(3) = &Cfont
Gpavlu(4) = &Cnmode
Gpavlu(5) = &Csize
return
-------------------------------------------------
$***********_GPA_REST.GRS****************
Proc/ Gpavlu
Number/ Gpavlu(43)
&Apsite = Gpavlu(1)
&Aunit = Gpavlu(2)
&Cfont = Gpavlu(3)
&Cnmode = Gpavlu(4)
&Csize = Gpavlu(5)
return
------------------------------------------------------
Here is the current program:
$********************************
ENTITY/L, ents(1000)
NUMBER/ORIG(3),LNS,RSP, cntr, spot
STRING/NTXT(132),RTXT(132)
data/ cntr, 0
inexte/ all
MASK/25 $$DRAFTING OBJECTS
$$ Call Subroutine
CALL/'_GPA_SAVE'
$$ SET CFONT TO HELIOS_BOLD_CON $$$$$$$$$$$$$$$$$$$$$$$$$$
ASGNFT/Gpavlu(3),4,IFERR,L1:
L1:
spot = -1
L = nexte/ ifend, Z99:
if/ L == &nulent, jump/ z99:
ORIG(1..3)=&ORIGIN(L)
$$ RETRIEVE TEXT OF OBJECT
NTXT=&DMTEXT(L)
spot = FNDSTR(NTXT,'<F1>',1)
ifthen/ spot >= 1
cntr = cntr + 1
ents(cntr) = L
$$ REPLACE TEXT IN NOTE
RTXT=REPSTR(NTXT,'<F1>','',1)
RTXT=REPSTR(RTXT,'<F>','',1)
$$ CREATE NEW NOTE
NOTE/ORIG(1),ORIG(2),RTXT
$$ DELETE OLD NOTE
$$ DELETE/L $$ we can't delete while cycling
endif
jump/ L1:
Z99:
$$ done cycling, so now delete all the old notes
ifthen/ cntr > 0
delete/ ents(1..cntr)
endif
$$ Call Subroutine
CALL/'_GPA_REST'
print/ 'CNTR: ', cntr
HALT
----------------------------------------------------------
I'm not sure if this is the way I want to go but I thought it might be good experience.
thanks,
lsl49