MC-Basic:VARIABLETYPE

From SoftMC-Wiki
Jump to: navigation, search

   

Language: English

{{MC-Basic
|SHORT FORM=


|SYNTAX=
 ?VariableType (<variablename_string>)

?VariableType (<namespce::variablename_string>)

|AVAILABILITY=
From version 4.20.6

.

|DESCRIPTION=
This query returns the data type of a global variable. The variable types are displayed in a format identical to the declaration format.

       {CONST} <data_type>  {OF <UTF8 | robot_type>} {NAMESPACE IS <namespace_name>}

 The constants names are shown with  the const word .

For arrays, the data type is preceded by the number of elements in each dimension.

        [first_dimension]{[second_dimension]...} <array_data_type>  {OF <UTF8 | robot_type>} {NAMESPACE IS <namespace_name>}

                            

|TYPE=
<return value>: String


|RANGE=


|UNITS=


|DEFAULT=


|SCOPE=
Configuration, Task or Terminal

|LIMITATIONS=
Read only

The variable name input cannot include wild cards.

If the variable has a namespace, it must be included in the varibale name input.

Cannot be used for motion elements (generic and non-generic), structures (types), user errors and semaphores.

|EXAMPLE=

?VariableType("Str1")
?VariableType("PointsArray1")
VName = "MyTask::Var1"
?VariableType(VNane)



|SEE ALSO=
* VARLIST
* VARLIST$
* SAVE
}}