<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c0c0c0>
<DIV><FONT face=Arial size=2>Hi Hansi... hope this code can help
u!! </FONT></DIV>
<DIV><FONT face=Arial size=2>(all with in the same "type" block... i.e. do not
"interrupt" the "type" block with "const" or "procedure" or "function"
or "type")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>type</FONT></DIV>
<DIV><FONT face=Arial size=2>p<FONT face="Times New Roman"
size=3>usb_device = ^usb_device;</FONT></FONT></DIV>
<DIV>pusb_bus = ^usb_bus;</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>// .. more typedefs</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>usb_device = record</DIV>
<DIV><FONT face=Arial size=2> a: <FONT face="Times New Roman"
size=3>pusb_bus;</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2> b: </FONT><FONT
face="Times New Roman" size=3>pusb_device;</FONT></DIV>
<DIV><FONT face=Arial size=2> // x: <FONT
face="Times New Roman" size=3>usb_device is invalid
(recursive!!!)</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2> // xx: <FONT
face="Times New Roman" size=3>usb_bus is invalid too. </FONT></FONT></DIV>
<DIV><FONT face=Arial size=2> end;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>// .. more typedefs</FONT></DIV><FONT face=Arial
size=2></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>usb_bus = record</DIV>
<DIV>
<DIV><FONT face=Arial size=2> c: <FONT face="Times New Roman"
size=3>pusb_bus;</FONT></FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2> d: <FONT face="Times New Roman"
size=3>usb_device ;</FONT></FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2> e: <FONT face="Times New Roman"
size=3>pusb_device ;</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2> // xx: <FONT
face="Times New Roman" size=3>usb_bus is
invalid (recursive!!!)</FONT></FONT>
</FONT></DIV></DIV></DIV></DIV></DIV>
<DIV><FONT face=Arial size=2> end;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>warm regards</FONT></DIV>
<DIV><FONT face=Arial size=2>max</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>Message: 1<BR>From: Johann Glaser <<A
href="mailto:Johann.Glaser@gmx.at">Johann.Glaser@gmx.at</A>><BR>To:
FPC-Pascal <<A
href="mailto:fpc-pascal@deadlock.et.tudelft.nl">fpc-pascal@deadlock.et.tudelft.nl</A>><BR>Organization:
<BR>Date: 23 Apr 2003 21:35:41 +0200<BR>Subject: [fpc-pascal]Forward type
declaration<BR>Reply-To: <A
href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</A><BR><BR>Hi!<BR><BR>Currently
I'm translating libusb for FPC. Therefore I used "h2pas".<BR><BR>libusb has two
types called usb_device and usb_bus. Both are records.<BR>Each of them has
fields, which have ^usb_device and ^usb_bus as types.<BR>So there is a cross
type reference between these two records.<BR><BR>In C they simply build a
forward type declaration ("struct usb_device;<BR>struct usb_bus;"). In FPC
unfortunately this is not possible. Is this<BR>correct? <BR><BR>Are there any
plans to add forward type declarations?<BR><BR>BTW: h2pas crashes with runtime
error 216 when it encounters incomplete<BR>type definitions like the above
mentioned "struct"s. I'm using the<BR>Debian 1.0.6-1 package of fp-compiler and
all other parts.<BR><BR>Bye<BR> Hansi</DIV></BODY></HTML>