Quick Question: Does ''RETURN'' send the programme back to ''Main'' or......
Archiver
Posts: 46,084
...and here is a tip to help you remember where you are at. On your return
statement, add a comment with the name of the subroutine -- ie:
Do_This:
'your subroutine code goes here
RETURN 'Do_This
Original Message
> It returns to the line following the GOSUB.
>
> Even though this is pretty obvious to those of us who have been
programming
> since the stone age, I decided to RTFM myself before spouting off. RETURN
> acts as a "goto start of program" if there is no outstanding GOSUB. I
> hadn't noticed that before. Could lead to some interesting bugs!
> Quick Question: Does 'RETURN' send the programme back to 'Main' or
> back to the place from which it was called. Thanks!!
statement, add a comment with the name of the subroutine -- ie:
Do_This:
'your subroutine code goes here
RETURN 'Do_This
Original Message
> It returns to the line following the GOSUB.
>
> Even though this is pretty obvious to those of us who have been
programming
> since the stone age, I decided to RTFM myself before spouting off. RETURN
> acts as a "goto start of program" if there is no outstanding GOSUB. I
> hadn't noticed that before. Could lead to some interesting bugs!
> Quick Question: Does 'RETURN' send the programme back to 'Main' or
> back to the place from which it was called. Thanks!!