GOTO

From REALbasicWiki

Jump to: navigation, search

GOTO is a jump control structure. It's the one your parents warned you about.

GOTO allows you to jump to an arbitrary point in a method.

[edit] Syntax

GOTO labelName

A label is a string literal that begins with a letter and is terminated by a colon.

labelName:

[edit] Example


Sub Example()
dim f as FolderItem = DesktopFolder
if f is nil then
GOTO cleanup
end if


cleanup:
//release resources
End Sub

Personal tools
related