• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1500
  • Last Modified:

What is CLNG in VB?

What is CLng function (VB 5) doing and how can I implement it in VB for DOS (BC.EXE does not know what CLng is)?
0
kph1
Asked:
kph1
1 Solution
 
ESICommented:
CLng stands for Convet to Long, for example when you want force the representation of an integer (16 bits) to be stored in a Long (32 bits) variable. But most of the time, VB do an implicit convertion when needed.
Ex :
Dim a As Integer, b as Long
Dim v As Variant

a = 3445
b = CLng(a)   '-- Not really needed in VB ! just 4 the example
v = 454546.34 '-- v contains a float
b = CLng(v)   '-- convert it to a long

Hope it helped ! Bye, happy conversion !

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now