Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-10

FPC question,complex forward records?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Johnson

I am trying to port IDL.h, as it is required by some other libs, and I found out that doing the way I have been is going to be somethings of a nightmare. Most of the records use TIDL_tree_node, which uses everything.. aka curcular reference. The way they get around this in the c Header is with a forward declaration of TIDL_tree_node. Is it possible to do this in FPC as well? something like -

  TIDL_tree_node = record;

and then re-declare it later in the file?

With classes this is easy but I am rather stumped on how to do this for record.

Andrew

_________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com

Reply by email

Florian Klaempfl
to Andrew Johnson
you wrote 10 lines
I am trying to port IDL.h, as it is required by some other libs, and I found out that doing the way I have been is going to be somethings of a nightmare. Most of the records use TIDL_tree_node, which uses everything.. aka curcular reference. The way they get around this in the c Header is with a forward declaration of TIDL_tree_node. Is it possible to do this in FPC as well? something like - TIDL_tree_node = record; and then re-declare it later in the file?

No, because you've to know the size when you use it.

With classes this is easy but I am rather stumped on how to do this for record.

Can you send the me the idl.h or/and .pp, then I'll look for a solution.

Reply by email