I'm using GPC 2.8.1 and I've got problems with the following manuever.
Down in my procedure "DestroyPQueue" I try to assign the address from the left pointer to the local pointer pseg. I get: "Assignment from incompatible pointer type". They are created from the same type so I don't understand why this doesn't work.
<---> module PriQueue interface;
export PriQueue = ( PQueue, ... ); .. type ElementType = Integer; SegPek = ^TreeSeg; TreeSeg = record data : ElementType; left : SegPek; right : SegPek; end; PQueue = record root : SegPek; numberOfElements : Integer; end; .. procedure DestroyPQueue(var pq : PQueue); .. end.
module PriQueue implementation;
type ElementType = Integer; SegPek = ^TreeSeg; TreeSeg = record data : ElementType; left : SegPek; right : SegPek; end; .. procedure DestroyPQueue; var pseg : SegPek; begin pseg := pq.root^.left; { HERE'S THE PROBLEM } .. end; .. end. <--->
____________________________________ Gratis epost med TJOHOOMAIL http://www.tjohoo.se