Solved

type characters in vb6

Posted on 2003-11-07
2
303 Views
Last Modified: 2013-12-26
can anyone tell me where to find a list of all the type characters used in vb6?
or tell me......
what is the $ symbol used for?


thanks
0
Comment
Question by:RunToTheHills
2 Comments
 
LVL 1

Expert Comment

by:DeuceEE
ID: 9705598
Are you looking for the character set?
These?
http://msdn.microsoft.com/library/en-us/vbenlr98/html/vamscansitable.asp?frame=true
http://msdn.microsoft.com/library/en-us/vbenlr98/html/vamscansitable2.asp?frame=true


$ is usually to any variable/function that deals with a string.
For example:

Dim MyString$
MyString$ = "Hello World!"

At least that's how it was in QBasic -- I never tried that line in VB; don't use it.
What I'm sure of is the functions, like

Chr$(65) -- this returns the character whose number is 65, which is "A"
Mid$("Possession", 1, 7) -- this returns the string "Possess"
Left$(), Right$(), etc...

You can actually omit it -- like Chr(65) is fine. But I once read that using the $ sign makes it faster, somehow.
0
 

Accepted Solution

by:
EmcoMaster earned 75 total points
ID: 9706580
Data Type Declaration Characters:

& = Long
% = Integer
@ = Currency
! = Single
# = Double
$ = String

Using these in your programs is *not* required.
However:
Using the type declaration in the Dim statement (Dim X$ as String) will allow the program to allocate variable storage space properly at the biginning of the program, instead of dynamically allocating it during execution.
Using the type declaration characters makes it easier to follow a program's flow when reviewing the source code.
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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

758 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

23 Experts available now in Live!

Get 1:1 Help Now