UnDim 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

Undefines a variable. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

UnDim variable_name 

variable_name is the name of a variable that was declared through the MapBasic window or through a workspace.

Restrictions

The UnDim statement cannot be used in a compiled MapBasic program; it may only be used within a workspace or entered through the MapBasic window.

Description

After you use the Dim statement to create a variable, you can use the UnDim statement to destroy that variable definition. For example, suppose you type a Dim statement into the MapBasic window to declare the variable X:

Dim X As Integer 

Now suppose you want to redefine X to be a Float. The following statements redefine X:

UnDim X 
Dim X As Float

See Also:

Dim statement, ReDim statement