|
-
Nov 12th, 2000, 12:18 PM
#1
Thread Starter
Lively Member
Hey Colleges!!!
I have this question that's REALLY consuming me time!
I have this module where i made a Public type with 2000 "sub variables":
Public type Var1
v1 as long
v2 as long
v3 as long
...
end type
Each variable has 3 numbers separated with "," .
What i want to do is write a simple way of taking the values i put into each of the 2000 variables
Thats because i need to put the 3 numbers in a vb function, this is what i tryed:
For i = 1 To 2000
ii = 0 + 50
Dim a, b, c As String
a = Mid(Var1.v(i), 1, 4)
b = Mid(Var1.v(i), 5, 4)
c = Mid(Var1.v(i), 9, 4)
Picture1.PSet (0, ii), RGB(a, b, c)
Next
This doesn't work, and i wouldn´t like to write 2000 times the same code to take the values!
I appreciate any kind of help!
Thanks a lot guys!!
-
Nov 12th, 2000, 12:30 PM
#2
-
Nov 12th, 2000, 12:50 PM
#3
Thread Starter
Lively Member
And i'm planning to use more variables, lol, but anyway,
if i use an array can i use the code i wrote? but if i do so i put the array where? Cause i need to make em accessable throught the program...
Thanks again!
Awaiting reply... Login OFF
-
Nov 12th, 2000, 01:07 PM
#4
transcendental analytic
How about an array of longs:
Code:
Public type Var1
v(1999) as long
End type
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|