Skip to content
Narta Xaymar Dirks edited this page Oct 27, 2026 · 1 revision

Blitz3DBlitzPlusBlitzBasic

Gosub

Gosub label

Description

Runs the code at .label like a subroutine. The code has to end with Return, which comes back to the line after the Gosub. The label has to be in the same function or in the main program, depending on where the Gosub is.

Examples

Gosub greet
Gosub greet
End

.greet
Print "hello"
Return
hello
hello

Related Commands

EndFunction, Function, Goto, Return

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally