Skip to main content

Convert-to-Integer-Data

Command Description

Convert data type to integer

Command Prototype

iRet = CInt(varData)

Parameter Description

ParameterRequiredTypeDefaultDescription
varDataTrueexpression$PrevResultData to be converted

return

iRet,The variable used to save the output of the command.

Demo

TracePrint("---------------------Convert to decimal data---------------------- -------") 
//------------------------------------------------------------------------
//[Remarks] Convert the data to a decimal (floating point number)
//Input parameter 1:
// varData----->target data
//out parameters:
// Converted decimal data
TracePrint("Convert string '1.5' to decimal")
TracePrint("The data type before conversion is: "&Type("1.5"))
dRet = CInt ("1.5")
TracePrint("The converted data type is: "&type(dRet))