Structures and such
Posted: Mon Jan 03, 2005 7:01 am
I've been fighting with this all day now.. please assist if possible.
In delphi i'd do this:
(^ in the Delphi code is a pointer)
Now, i have tried just about everything to get this to translate to PureBasic.
This gives an error deep in the code about an undefined structure (PGridPoint).
I need the structure TGridCube to point to whatever is inside the structure TGridPoint (hard to explain how i use it in code, but it's used for a load of math)
Is there any way to do what Delphi does without even breaking a sweat?
Tim
In delphi i'd do this:
Code: Select all
TGridPoint = record
P : TGLCoord;
Value : FLoat;
end;
PGridPoint = ^TGridPoint;
TGridCube = record
GridPoint : Array [0..7] of PGridPoint;
end;
Now, i have tried just about everything to get this to translate to PureBasic.
Code: Select all
Structure TGridPoint
p.TGLCoord
value.f
EndStructure
*PGridPoint = TGridPoint
Structure TGridCube
*GridPoint.PGridPoint[8]
EndStructure
I need the structure TGridCube to point to whatever is inside the structure TGridPoint (hard to explain how i use it in code, but it's used for a load of math)
Is there any way to do what Delphi does without even breaking a sweat?
Tim