Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Variable and declaration terminology

Posted on 2004-11-01
6
Medium Priority
?
251 Views
Last Modified: 2010-05-02
Can someone explain to me what the ampersand represents in this declaration: ByVal sigNode& as well as the dollar sign and percent for variables: szEntity$, ret %.

0
Comment
Question by:ampapa
[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
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:bramsquad
ID: 12463658
got this from Q_20343884

The "$" is a carryover from the original BASIC to indicate that a variable or function was a string-type.  In VB, this was retained and later made optional, although the string-type operates slightly faster than the version without the string (which uses a variant.)

If you attempt to use a "$" after a non-string variable, you may get an error.

These are identical in VB6:

Dim A$
Dim A as string
0
 
LVL 8

Accepted Solution

by:
bramsquad earned 500 total points
ID: 12463716
and i just found the rest

they are all type declaration indicators -

($) - string
(!) - single
(&) - long
(%) - integer
(#) - double
(@) - currency

~b
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12464002
& is a long.

As in

   dim A as long,

is also
 
   dim A&

HTH

J.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 8

Author Comment

by:ampapa
ID: 12464228
So, if these are optional as long as I find replace them and properly declare the values correctly I shouldn't have any problems?
0
 
LVL 8

Expert Comment

by:bramsquad
ID: 12464584
exactly, i think they kept them in for the "smooth transition" effect for BASIC to vb users.  

they took them out in vb.net....
0
 
LVL 8

Author Comment

by:ampapa
ID: 12465058
Thanks for the speedy reply's.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses

610 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