<< Prev        Next >>

ID : 5519

VarType

Function

Return a value which represents the Internal processing format of variables.

This command is available in Ver.1.6.* or higher.

Syntax

VarType(Variable)

Guaranteed entry

Variable
Specify arbitrary variable. All types of variables are available. Numbers and character strings can be specified directly as well.

Return value

Return the Internal processing format by Integer type data. For about values of the Internal processing format, see Variant.h.

Description

Return the value which represents Internal processing format of variable.

If a variable is the Variant type array, the returned value is a sum of the value representing an array and the value representing a data type. For example, if an integer type array is specified as a variable, 8195 will be returned; that is the sum of the integer type (3) and the array (8192).

Attention

-

Example

'!TITLE "Obtain the internal processing format of variable"
'Check that the internal processing format of variable is I-type data

#include <Variant.h>

Sub Main
  Dim varData as Variant

  Comm.Open 1

  varData = Comm.Input(1)
  If VarType( varData ) And (VT_ARRAY Or VT_UI1) Then
    ' If incoming data is byte array data
    ReadByteArray I0, VarData
  End If

  Comm.Close 1   

End Sub

ID : 5519

<< Prev        Next >>