> I don't understand something...
> 
> When defining record rrr:
> type rrr=record
>           a:word;
>           b:string[20];
>           c:boolean;
>           reserve:string[100];
>          end;
> var sss:rrr;
> 
> ...and geting SizeOf(sss) I get: 126
> 
> When redefining record rrr to (adding variable d:real - it is 8-byte long,
> and subtracting length of string variable by 8):
> type rrr=record
>           a:word;
>           b:string[20];
>           c:boolean;
>           d:real;
>           reserve:string[92];
>          end;
> var sss:rrr;
> 
> ...and geting SizeOf(sss) I get: 128
> 
> but I should get 126?!...or not?!?!?

Maybe there is some alignment directive in action.
Use "packed record" instead.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to