我对Pascal很新,并试图引用之后定义的类型,但这样做不起作用。 这在Pascal中甚至可能吗?
type
Node = record
Name: string;
Id: integer;
Routes: array of Route;
end;
Route = record
Distance: integer;
NodeA, NodeB: Node;
end;
感谢您的帮助。
答案 0 :(得分:3)
我已经找到了解决方案。
Type
PRoute = ^Route;
Node = record
Name: string;
Id: integer;
Routes: array of PRoute;
end;
Route = record
Distance: integer;
NodeA, NodeB: Node;
end;