|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm new with delphi and I have a problem with a recursive type declaration. Let me give you an example first:
type TNode = record x, y: integer; left: TNode;end; I'm trying to declare a record-type. But because I want to use it in a recursive routine, I try to declare a 'left' variable of the same type. Delphi doesn't like this. Does anyone know how I can solve this problem? Thx, Bill |
|
#2
|
||||
|
||||
|
Code:
type
TNodePtr = ^TNode;
TNode = record
x, y : integer;
left : TNodePtr;
end;
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
Thx,
I already found it in the help file, but thanks anyway. I apreciate all the help you can give me ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Problem with recursive type declaration |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|