Solved

type characters in vb6

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

628 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