Solved

What is CLNG in VB?

Posted on 1997-07-24
1
1,481 Views
Last Modified: 2008-02-26
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
Comment
Question by:kph1
1 Comment
 
LVL 3

Accepted Solution

by:
ESI earned 50 total points
ID: 1428825
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now