Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

type characters in vb6

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
RunToTheHills
Asked:
RunToTheHills
1 Solution
 
DeuceEECommented:
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
 
EmcoMasterCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now