[fpc-pascal] Translate C to Pascal

Mattias Gärtner nc-gaertnma at netcologne.de
Wed Aug 13 13:18:39 CEST 2008

Zitat von Vinzent Höfler <JeLlyFish.software at gmx.net>:

> >>>   a: record end;
> >
> > Thanks. I will use that.
> What for? The C statement is empty, it's not a variable and not even a
> type. So before translating that into an empty Pascal-record, you should
> rather look at what the actually used structur in the C-code is.

Actually the C-Code does what C can do really good: obfuscating.

If I understand the code correct, the 'struct a;' itself is never used directly.
It always uses 'struct a* foo'. So foo is a pointer to an empty struct
a, which probably is the C equivalent of a typed pointer. To get strong type
checking, I guess, it is ok to follow Felipe's advice:

type a = record end; pa=^a;


More information about the fpc-pascal mailing list