[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Subroutines
- Subject: Subroutines
- From: Harry Binswanger hb@xxxxxxxx
- Date: Thu, 09 Apr 2009 00:22:09 -0400
I have long had problems, due to my ignorance, with using SUbroutines in
XPL. (I know they have to be near the top of the programs--certainly before
they are called.)
My specific problem was how to exit the subroutine conditionally. I've
worked out a solution, but I wonder if I did the optimal thing. What I want
is something like this:
;*; INPUT.LOOP
>>;*;
==1> [BC]Aborted;*;
==28>;*; <==== this is the problem line
;*;
;*; EXITSUB
[NO]>
I want to exit the input routine when ENTER has been hit, and what I've
done is just have execution, on that condition, jump to a label at the end
of the routine. Is that the right/best way to do this? I had problems using
either or to jump out of the subroutine when ENTER is hit (but
I'm not sure those problems weren't due to something outside the subroutine
itself).
Thanks,
Harry
Harry Binswanger
hb@xxxxxxxx