Solved

type characters in vb6

Posted on 2003-11-07
2
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

734 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