[fpc-pascal] Translate C to Pascal

Vinzent Höfler JeLlyFish.software at gmx.net
Wed Aug 13 12:48:20 CEST 2008


Felipe Monteiro de Carvalho wrote:
> On Wed, Aug 13, 2008 at 7:38 AM, Vinzent Höfler
> <JeLlyFish.software at gmx.net> wrote:
>> 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.
> 
> It is usually used for having an opaque type, referencing it with a
> pointer. I would put in pascal both the empty structure and a pointer
> type to it.

But then the structures won't match, opaque or not.

Mattias provided no context to his original question, so I don't know if 
it would impose a problem, but usually I leave those things out until I 
really need them. The type as is has no storage size associated to it, 
so it can't even be used that way in the C-code. Sure, you can have a 
pointer to it, but unless you cast the hell out of it, it still won't do 
any good.


Vinzent.




More information about the fpc-pascal mailing list