Exit Sub statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Exits a Sub...End Sub statement.

Restrictions

You cannot issue an Exit Sub statement through the MapBasic window.

Syntax

Exit Sub

Description

An Exit Sub statement causes MapBasic to exit the current sub procedure. Accordingly, an Exit Sub statement may only be issued from within a sub procedure.

Sub...End Sub statement may be nested; in other words, one sub procedure can call another sub procedure, which, in turn, can call yet another sub procedure, etc. Note that a single Exit Sub statement exits only the current sub procedure.

See Also:

Call statement, Sub...End Sub statement