> Datum: Wed, 30 Jul 2008 10:10:09 -0700 (PDT)
> Von: Gene Buckle <[EMAIL PROTECTED]>
> An: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
> Betreff: Re: [fpc-pascal] Translate C to Pascal

> > How to translate this:
> >
> > struct a;
> >
> >
> er...
> 
> Closest would be:
> 
> type
>      record = foo
>         bar  : integer;
>      end;
> 
> var
>     a  : foo;

No. The a is not an instantiation, it's an incomplete type. I wouldn't 
translate it at all, it's merely a forward declaration. As the (C-)compiler 
wouldn't know the size of the type at this point, it can't instantiate anything 
(although pointer to it would be possible, AFAIR).


Vinzent.
-- 
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to