46801Re: [libertybasic] Requesting assistance with mystery bug
- Jun 19, 2013I absolutely agree with you; I did not word my reply clearly. I was
meaning that the SUB was the true subroutine, which caused the label
outside the subroutine to not be visible from within the subroutine.
The GOSUB is not a true subroutine, but it would keep the label
associated with the button visible within the loop. In my other reply I
mentioned that he could continue to use the SUB by using the button to
cause a legal exit from the SUB.
As I believe I have noticed often in the past, you have warned against
mixing GOSUBs and SUBs. I have learned a great deal from your posts.
On 6/19/2013 12:12 AM, Stefan Pendl wrote:
> Am 18.06.2013 21:48, schrieb Robert Hendrix:
>> It would probably work if you used a gosub rather than a sub, which
>> actually calls a true subroutine.
> I would not say that GOSUB results in a "true" subroutine, since it is
> highly dependent on the main code it is called from.
> For me "true" subroutines are independent from the main code and can be
> reused in many projects, so I would qualify a SUB as a "true" subroutine.
> But that might even be personal preference.
> Stefan Pendl
> LB 4.04 Pro ... http://www.libertybasic.com/assist.html
> LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
> LB Community Wiki .............. http://basic.wikispaces.com/
> LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
> LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
> Books at http://www.lulu.com/ and http://www.amazon.com/
> Alyce Watson ... APIs for Liberty BASIC
> Carl Gundel .... Beginning Programming with Liberty BASIC
> Windows 7 Home Premium 64-bit SP1
> AMD Turion X2 RM-70 2GHz, 4GB RAM
> Yahoo! Groups Links
- << Previous post in topic Next post in topic >>