Posts: 66
Threads: 32
Joined: Dec 2002
Okey, I'll try to explain this en english
Here's an example:
TYPE Values
X AS SINGLE
END TYPE
DIM SHARED Player(2) AS Values
As it looks now i got Player(1).X, Player(2).X and so on..
But if i want something like this:
Player(1).Col(1), Player(2).Col(1)
Player(1).Col(2), Player(2).Col(2)
I want the variable col not to hold one value, but i want it ti be a array that can hold two values..
So not just Player(1).Col and Player(2).Col, i want Col to hold two values..
How do i declare something like that?
Thx alot!
ttp://hem.passagen.se/qb.basta
Posts: 57
Threads: 12
Joined: Mar 2003
I'm not sure , but try this :
TYPE Values
col(2) as single
END TYPE
But I repeat that I'm not sure ...
Posts: 57
Threads: 12
Joined: Mar 2003
Posts: 729
Threads: 105
Joined: Feb 2003
Sorry, it's not possible to take a type element and use it as an array in QB... it would be nice though.
size=9]"To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." -- Theodore Roosevelt[/size]
Posts: 6,419
Threads: 74
Joined: Mar 2002
It is possible in PDS (QB 7.1) and VBDOS, but not in QB4.5 and below.
Posts: 3,368
Threads: 195
Joined: Jan 2003
you can still do it in qb. this is what you do:
1) make a type
2) make a large array of that type
3) make two more integer arrays of the same size for each unique object that you want to have that type for (item, object, unit..).
Ok, now each itme, object, unit, etc... is in an array, and has an index. You use that index to look up the number in the first array and the number in the second array.
The first number would give you the start position of the array in (2), and the second would give either the amount of things in (2) that tie up to your first object, or the end position.
So, you go from the start to end position, and that gives you a type array for any object. Easy, eh? :lol:
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.