[fpc-pascal] Translate C to Pascal

"Vinzent Höfler" JeLlyFish.software at gmx.net
Wed Jul 30 19:54:08 CEST 2008


> Datum: Wed, 30 Jul 2008 10:10:09 -0700 (PDT)
> Von: Gene Buckle <geneb at deltasoft.com>
> An: FPC-Pascal users discussions <fpc-pascal at 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



More information about the fpc-pascal mailing list