Solved

type characters in vb6

Posted on 2003-11-07
2
305 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 Compile Compatibility Issue 4 102
Using "ScreenUpdating" 6 64
VB6 - Compare and highlight cell not the same 3 50
Error with a code discussed on this page 5 14
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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

770 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