[Seed7-users] Forward declarations
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Conrad S. <con...@gm...> - 2008-09-29 03:40:57
|
Hi Learning seed7, so please be gentle :-) I'm trying to implement a struct containing elements that are pointers to (or references of) the same struct. Something like const type: tn is new struct var ptr struct tn: left is NIL; var ptr struct tn: right is NIL; var integer: item is 0; end struct; In C it would look like this: typedef struct tn { struct tn* left; struct tn* right; int item; } Is there a way to achieve this? FWIW this is for a binary tree with integer items. Thanks, Conrad -- ----------------------------------------------------------------------------- Conrad D. Steenberg Ph.D. con...@ca... Scientific Software Engineer http://www.nupack.org Pierce Bio-Engineering Lab Mail Code 114-96 California Institute of Technology Pasadena, CA, 91125 |