All,
Many thanks as usual for your fine offerings of detailed and useful
information! I have managed to get things working by declaring c() as an
lconstant as Aaron and Steve advised:
define a();
lvars i = 5;
lconstant c;
define b();
if i < 5 then
i + 1 -> i;
c();
endif;
enddefine;
define c();
b();
enddefine;
c();
enddefine;
Thanks also for the advice about initialising "i" and forward
declarations. The "i" thing was an error on my part, I'm afraid -
something I neglected to copy across properly from my original code. The
forward declarations stuff was, however, entirely relevant.
As Jonathan predicted, I am indeed a Pascal programmer by nature and am
used to the wonders of nested functions and a single pass compiler. I
guess the main thing I didn't get before all this was the relationship
between procedure declarations and lvars and lconstants.
I code on with (I hope) increased wisdom!
Thanks,
Dave
--
Dave Gurnell
d.j.gurnell@cs.bham.ac.uk
|