I am trying to run a QuickBasic
file written by someone else in 1992. I am using QB64
on a Windows 10
machine. I get an error message that says Invalid variable name
in line 26
of the following code. Lines 1-31
are below, but here is line 26
in isolation.
COMMON SHARED /rgraph/ absxmin(), absymin(), absxmax(), absymax()
I tried changing the names of absxmin()
, absymin()
, absxmax()
, absymax()
to various things but the error message always appeared. Then I tried removing line 26
and I got the same error message for the next line.
COMMON SHARED /rgraph/ uxmin(), uymin(), uxmax(), uymax(), shrinkl(), shrinkr()
Here are lines 1-31
. When people use the code, which came with a book, people are asked to attribute it. So, the code was written by Ray Hilborn, I believe.
DECLARE SUB zGraphInit (ScreenNumber#)
DECLARE SUB zLabelX (ig!, label$)
DECLARE SUB zLabelY (ig!, ylabel$)
DECLARE SUB hess (popt#(), h#(), r#(), sigma#, npar!, npts!, lu!)
DECLARE SUB CallFlet ()
DECLARE SUB UserPlot (itn!, f#, n!, x#())
DECLARE SUB zClearTotalScreen ()
DECLARE SUB waitsub ()
DECLARE SUB InitGraphs ()
DECLARE SUB zGrid (ig!, xtics#, ytics#)
DECLARE SUB zCursor (ig!, x#, y#, irow!, icol!)
DECLARE SUB zScale (ig!, axs#, ays#, axl#, ayl#, uxs#, uys#, uxl#, uyl#, shl#, shr#)
DECLARE SUB mnmx (x#(), n!, xmin#, xmax#)
DECLARE SUB zGraphView (ig!)
DECLARE SUB flet (f#, x#(), n!, g#(), h#(), dfn#, xm#(), hh#, eps#, mode!, maxfn!, iprint!, w#(), iexit!)
DECLARE FUNCTION func# (x#(), n!)
DECLARE SUB printstats (xtime#, itn!, ifn!, f#, n!, x#(), g#())
DECLARE FUNCTION NormDev! ()
DECLARE FUNCTION xmed# (x#(), n!)
DECLARE SUB zLocate (irow!, icol!)
DECLARE SUB InputData ()
DEFDBL A-H, O-Z
DIM absxmin(10), absymin(10), absxmax(10), absymax(10), absperux(10), absperuy(10)
DIM uxmin(10), uymin(10), uxmax(10), uymax(10), shrinkl(10), shrinkr(10)
COMMON SHARED /rgraph/ absxmin(), absymin(), absxmax(), absymax()
COMMON SHARED /rgraph/ uxmin(), uymin(), uxmax(), uymax(), shrinkl(), shrinkr()
COMMON SHARED /rgraph/ screenxdots, screenydots, absperux(), absperuy()
COMMON SHARED IprintResid, iprint, Idebug
Thank you for any help in resolving this error message.