What is the meaning of Dim

C

chen li

Hi all,

Dim in VBA is a key word used to define variable. But
what does it stand for? For example

Dim varCopy As Long



Thanks,

Li

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
L

Li Chen

Paul said:
Basically, in VBA, "dim" causes a variable to be declared and associated
with a predefined data type or class.

In Ruby def is a breviation for the word define and what is the full
name for dim in VBA? I want to know it just out of curiocity. I don't
pay much attention to VBA but when I use WIN32OLE for Excel automation I
would like to know a little more.

Thanks,


Li
 
M

Mike Stok

In Ruby def is a breviation for the word define and what is the full
name for dim in VBA? I want to know it just out of curiocity. I don't
pay much attention to VBA but when I use WIN32OLE for Excel
automation I
would like to know a little more.

My vague memories of Basic (not Visual Basic) include using DIM to
dimension arrays - see http://en.wikipedia.org/wiki/
Dartmouth_BASIC#List_of_statements

I don't know when it changed into a general declaration lead-in.

Mike

--

Mike Stok <[email protected]>
http://www.stok.ca/~mike/

The "`Stok' disclaimers" apply.
 
M

M. Edward (Ed) Borasky

Li said:
In Ruby def is a breviation for the word define and what is the full
name for dim in VBA? I want to know it just out of curiocity. I don't
pay much attention to VBA but when I use WIN32OLE for Excel automation I
would like to know a little more.

Thanks,


Li
DIMension -- from the original Dartmouth BASIC, which descended from
FORTRAN, where DIMENSION is spelled out.

HTH.
 
T

Tom Werner

chen said:
Dim in VBA is a key word used to define variable. But
what does it stand for? For example

Dim varCopy As Long

VB was actually created as a joke programming language by a college
student. He used 'Dim' for variable definition as a tongue-in-cheek
insult to those foolish enough to stumble across and end up using his
little project. Ironically, Microsoft ended up picking up the fledgling
language as their script of choice for business app customization, much
to the delight of the language's originator--for what could make better
comedy than throngs of business professionals typing Dim all day long,
secure in the thought that they were using a productive programming
language. Just the thought of it still makes me twitter with glee.

Tom
 
J

Jeremy McAnally

That story is untrue, and I believe meant as a joke. :)

At least I hope so, because the proper explanation is that Dim means
"dimension" as others mentioned before.

--Jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top