Misplaced Pages

GOSUB

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.

This is an old revision of this page, as edited by 75.16.114.249 (talk) at 14:46, 27 January 2008. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 14:46, 27 January 2008 by 75.16.114.249 (talk)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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. Some BASIC implementations, such as FreeBASIC do not implement GOSUB. This may lead to overuse of the GOTO statement and to less structured code.

Stub icon

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

Categories: