Skip to main content

CLng()

This functions changes a number into a long type.

Script

Sub Main
    Dim aDbl1, aDbl2 As Double
    Dim aLng1, aLng2 As Long
    aDbl1 = 25427.45
    aDbl2 = 25427.55
    MsgBox CLng(aDbl1) 'returns 25427

    ' The following line of code sets aLng2 to 25428.
    MsgBox CLng(aDbl2) 'returns 25428
End Sub

IDEAScript Language