<< Prev        Next >>

ID : 5520

VarChangeType

Function

Convert the value into Variant type data with a specified Internal processing format.

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

Syntax

VarChangeType(Variable,Internal processing format)

Guaranteed entry

Variable
Specify a value that you intend to convert. Variables and numeric values can be specified.
Internal processing format
Specify an Internal processing format of converted data by Integer type data. For about values of the Internal processing format , see Variant.h.

Return value

Return a Variant type data which has been converted into the variable type specified by the internal processing format.

Description

Convert the specified value into the Variant type data with a specified Internal processing format.

If you use constants, which are defined by Variant.h, for the internal processing format, embed Variant.h into #include.

Attention

Some Internal processing format which is defined by Variant.h, are not available for VarChangeType. If these are used, an error will occur at VarChangeType execution.

Example


'!TITLE "Convert the internal processing format of variables"
'Date calculation

#include <Variant.h>

Sub Main

  Dim varLaptime as Variant

  varLaptime = VarChangeType(now, VT_DATE) - VarChangeType("2013/07/01", VT_DATE)
  PrintDbg format(varLaptime, "Elapsed time hh:mm:ss")

End Sub

ID : 5520

<< Prev        Next >>