
April 28th, 2011, 08:08 PM
#1
Define a variable
WHat does this mean
Dim variable(0,5) as Long
later I'd use it as
CoCreateInstance(variable(0),...)
Someone could help me please ?
Thank you

April 28th, 2011, 08:35 PM
#2
Re: Define a variable
This means that each VAR has 0x5 (starting at 0, or 1x6) entries
Code:
Dim variable(0,5) as Long
To use this:
Code:
Dim MyNum(1,5) as Long
Dim x as Int, as Int
for x=0 to 1
for y=0 to 5
print "X= & x & " and Y=" & y
next y
next x
it will print out
X= 0 and Y= 0
X= 0 and Y= 1
X= 0 and Y= 2
X= 0 and Y= 3
X= 0 and Y= 4
X= 0 and Y= 5
X= 1 and Y= 0
X= 1 and Y= 1
X= 1 and Y= 2
X= 1 and Y= 3
X= 1 and Y= 4
X= 1 and Y= 5

April 29th, 2011, 02:06 AM
#3
Re: Define a variable
Dglienna,
In my learning period , Our teacher taught us something like this, we found it to be useless.
But AFAI Remember he taught us the same thing which outputted a pyramid of * 's .
Can you please refresh me once again the same?
Rahul

April 29th, 2011, 11:40 AM
#4
Re: Define a variable
In my learning period , Our teacher taught us something like this, we found it to be useless.
Then go back, and study my code again. You asked about an array, not building a string of "*"s
If you built a matrix of "*"s (to form WORDS for instance) I'd be impressed
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.
Featured
