From: rusure on
My C64 subroutine contains a CLR operation. The
RETUR fails with a RETURN without a GOSUB
diagnostic, Is this what's supposed to happen?
From: iAN CooG on
rusure <r_u_sure(a)mybluelight.com> wrote:
> My C64 subroutine contains a CLR operation. The
> RETUR fails with a RETURN without a GOSUB
> diagnostic, Is this what's supposed to happen?

yes, it's also written on the programmer's reference guide

--
-=[]=--- iAN CooG/HVSC & C64Intros ---=[]=-


From: jeffob2008 on
On Aug 10, 11:23 am, rusure <r_u_s...(a)mybluelight.com> wrote:
> My C64 subroutine contains a CLR operation.  The
> RETUR fails with a RETURN without a GOSUB
> diagnostic,  Is this what's supposed to happen?

Yup, I believe it was because your CLR destroys your GOSUB marker you
setup prior.....if there are only a few variables to reset or CLeaR,
reset them with the syntax <VARIABLE>=0 or <VARIABLE>="", or make them
equal a value that manually CLeaRs them out; that way your GOSUB
marker stays intact and flow continues properly.
From: rusure on
On Aug 11, 3:53 pm, jeffob2008 <jeffobourd...(a)gmail.com> wrote:
> On Aug 10, 11:23 am, rusure <r_u_s...(a)mybluelight.com> wrote:
>
> > My C64 subroutine contains a CLR operation.  The
> > RETUR fails with a RETURN without a GOSUB
> > diagnostic,  Is this what's supposed to happen?
>
> Yup, I believe it was because your CLR destroys your GOSUB marker you
> setup prior.....if there are only a few variables to reset or CLeaR,
> reset them with the syntax <VARIABLE>=0 or <VARIABLE>="", or make them
> equal a value that manually CLeaRs them out; that way your GOSUB
> marker stays intact and flow continues properly.

I was just trying to see what CLR does to system parameters under
different situations. Thats why I put the CLR statement with a print
of those parameters in a subroutine. I didn't expect my subroutine to
bomb out when a return was attempted.