Misplaced Pages

GOSUB: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 22:06, 19 August 2007 edit86.153.9.140 (talk) coherence← Previous edit Revision as of 21:50, 23 January 2008 edit undoVogelfrei (talk | contribs)190 editsNo edit summaryNext edit →
Line 1: Line 1:
'''GOSUB''' is a command in many versions of ]. GOSUB statements branch to simple kinds of subroutines without (sometimes with) parameters or local variables, the ] command resuming program flow from the point at which GOSUB was invoked. '''GOSUB''' is a command in many versions of ]. GOSUB statements branch to simple kinds of ] without (sometimes with) parameters or local variables, the ] command resuming program flow from the point at which GOSUB was invoked.


The GOSUB command is convenient for performing the same function several times in a BASIC program without duplicating the code. It is not implemented in all versions of BASIC, which can lead to cumbersome ] loops. The GOSUB command is convenient for performing the same function several times in a BASIC program without duplicating the code. It is not implemented in all versions of BASIC, which can lead to cumbersome ] loops.

Revision as of 21:50, 23 January 2008

GOSUB is a command in many versions of BASIC. GOSUB statements branch to simple kinds of subroutines without (sometimes with) parameters or local variables, the RETURN command resuming program flow from the point at which GOSUB was invoked.

The GOSUB command is convenient for performing the same function several times in a BASIC program without duplicating the code. It is not implemented in all versions of BASIC, which can lead to cumbersome GOTO loops.

Stub icon

This programming-language-related article is a stub. You can help Misplaced Pages by expanding it.

Categories: