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