Home > Available Help Files > PC-DMIS BASIC Language > Language Reference A – Z > CInt Function > Example - CInt Function
Current Help File: PC-DMIS Basic (View Core Help)
Example - CInt Function
Sub Main()
Dim y As Long
y = 25
If VarType(y) = 3 Then
MsgBox "Y with a value of " & y & " has a variable type of " & VarType(y) & "."
x = CInt(y) 'Converts the Long value of y to an integer value in x
MsgBox "X with a value of " & x & " has a variable type of " & VarType(x) & "."
End If
End Sub