Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variables

Status
Not open for further replies.

rann

Programmer
Sep 13, 2001
86
US
Hi,
I recently downloaded some source code from the web
and noticed that the programmer has declared variables
as follows.

Private Sub Test(Total%, count$, Cost!)
.........
........
........
End Sub

what does these %,$ and ! stand for are they part of the
variable or do they mean some thing any help would be
appreciated.

Thanks in Advance,

rann.

 
What you see there are type declaration characters. Basically the %,$ and ! tell VB what type the variable is. See the link below for more details.


I believe

Private Sub Test(Total%, count$, Cost!)

is the same as

Private Sub Test(Total as integer, count as string, Cost as single)
Thanks and Good Luck!

zemp
 
rann -

This is a legacy way to declare variable types. Any new code you write shouldn't use them.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top