[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

What is the meaning of Dim

Li Chen

12/14/2006 8:19:00 AM

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...

8 Answers

Paul Lutus

12/14/2006 8:32:00 AM

0

chen li wrote:

> 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

http://en.wikipedia.org/...

"In some dialects, variables must be declared (using the DIM statement) on
their first usage; ..."

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

Some advice from an experienced programmer. Avoid too much immersion in VBA.
Microsoft is notorious for serial abandonment of its proprietary user-level
languages in its effort to get you to move on to their latest fad, all in
the name of continued corporate profitability.

--
Paul Lutus
http://www.ara...

Li Chen

12/14/2006 9:10:00 AM

0

Paul Lutus wrote:
> 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

--
Posted via http://www.ruby-....

Paul Lutus

12/14/2006 9:20:00 AM

0

Li Chen wrote:

> Paul Lutus wrote:
>> 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.

It was originally an abbreviation for "dimension", a term that was only
approximately related to its actual function. Think of "dimension" as a
verb and you will get some idea what the originators had in mind.

Also, it is important to add that "dimension" was originally meant to create
an array that might have more than one "dimension".

http://sip.clarku.edu/tutorials/True_...

"Arrays are defined in a DIM statement and the total number of elements of
an array is given in parentheses."

--
Paul Lutus
http://www.ara...

Mike Stok

12/14/2006 10:57:00 AM

0


On 14-Dec-06, at 4:09 AM, Li Chen wrote:

> Paul Lutus wrote:
>> 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.

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

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

Mike

--

Mike Stok <mike@stok.ca>
http://www.stok...

The "`Stok' disclaimers" apply.





M. Edward (Ed) Borasky

12/14/2006 2:01:00 PM

0

Li Chen wrote:
> Paul Lutus wrote:
>
>> 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
>
>
DIMension -- from the original Dartmouth BASIC, which descended from
FORTRAN, where DIMENSION is spelled out.

HTH.

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


Li Chen

12/14/2006 2:39:00 PM

0

Thank you all for the explanations,


Li

--
Posted via http://www.ruby-....

Tom Werner

12/14/2006 5:04:00 PM

0

chen li wrote:
> 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

Jeremy McAnally

12/14/2006 8:34:00 PM

0

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

On 12/14/06, Jason Roelofs <jameskilton@gmail.com> wrote:
> On 12/14/06, Tom Werner <pubsub@rubyisawesome.com> wrote:
> >
> > chen li wrote:
> > > 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
>
>
> Do you have any proof of this? I can't find such a story anywhere (after
> googling for about 5 minutes, of course. Yay work!)
>
> Jason
>
>