I would like to be able to declare something that works like struct or class in c++, which I would believe would be an object in StarBasic. Is this possible and in that case, how? A simple example perharps?
If this is not possible, I guess that some kind of array would do.
Will this example bekow work, and is there an easier way to do this (except declaring as Variant and then later let the different element be whatever they are assigned to)?
Dim MyArray(1 To 1,9) As String, MyArray(2 To 2,9) As Integer, MyArray(3 To 3,9) As Date
What I want to do is the following, if not obvious: MyArray(1,0) to MyArray(1,9) are string variables. MyArray(2,0) to MyArray(2,9) are integer variables. MyArray(3,0) to MyArray(3,9) are date variables.
This way I could fake my own kind of c++ structures by declaring some constants like the following example:
Const PlayerName=1 Const PlayerPoints=2 Const PlayerDate=3
Dim Player As Integer Dim Players(1 To 3, 9) As Variant
Players=SetEverything(Players) ' Supposed to return relevant data...
For Player=0 To 9
Print Players(PlayerName,Player)+", "+Players(PlayerPoints,Player)+" p, "+Players(PlayerDate,Player)
Next Player
Am I totally out of sense here?
-- Johnny
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
