[fpc-pascal] SizeOf(File) <> SizeOf(FileRec)
Søren Ager
sorenager at poboxes.com
Sat May 21 19:16:17 CEST 2005
Hi,
I have been playing around with Free Pascal for OS/2 but have stumbled
into a problem. I can't compile sockets.pas as SizeOf(File) <>
SizeOf(FileRec). So I made a test program - and it shows me that
userdata is only 16 bytes - how can that be? If I change the definition
of filerec other parts break! What is going on???
{$I filerec.inc}
type
mytest = array[1..32] of byte;
begin
writeln(sizeof(file));
writeln(sizeof(filerec));
writeln('----');
writeln(sizeof(filerec.Handle));
writeln(sizeof(filerec.Mode));
writeln(sizeof(filerec.RecSize));
writeln(sizeof(filerec._private));
writeln(sizeof(filerec.UserData));
writeln(sizeof(filerec.name));
writeln(sizeof(mytest));
end.
Output:
332
316
----
4
4
4
32
16
256
32
More information about the fpc-pascal
mailing list