# VB6 - Variable Indentifiers



## asbo (Sep 21, 2001)

Hey,

I was looking through a code snippet, and noticed that a variable was tagged with '$' on the end. I'm wondering what does this mean, and what other identifiers are there in VB?

Thanks,
asbo


----------



## coderitr (Oct 12, 2003)

It's usually an indicator that it's a string variable. A throwback to older versions of basic.


----------



## CtrlAltDestr (Sep 29, 2004)

Those are type declaration characters. I have to admit that I don't know EXACTLY what they do, as I never use them in programming, but it appears to me that they're just a naming convention so that you can keep track of what datatypes your variables are.

$ is String
% is Integer
& is Long
! is Single
# is Double
@ is Currency


----------



## asbo (Sep 21, 2001)

Ah, so just shorthand. It just struck me as odd because the line went something like

Dim sFile$, sPath As String

Redudant, or repetitive, or something. o_<

Thanks.


----------

