Return size (in bits) of a variable or type.
Source position: system.fpd line 66
function BitSizeOf( |
X: TAnyType |
):LongInt; |
BitSizeOf returns the size, in bits, of any variable or type-identifier. For regular variables or types, this is the same as SizeOf multiplied by 8, but for bitpacked records, the result may be different.
Remark: | This isn't really a RTL function. Its result is calculated at compile-time, and hard-coded in the executable. |
None.
|
Return size (in bytes) of a variable or type. |
|
|
Return address of a variable. |
Program Example122; { Program to demonstrate the BitSizeOf function. } type TB = bitpacked record B1,B2,B3,B4 : Boolean; end; TNB = record B1,B2,B3,B4 : Boolean; end; Var I : Longint; S : String [10]; begin Writeln (BitSizeOf(I)); { Prints 32 } Writeln (BitSizeOf(S)); { Prints 88 } Writeln (BitSizeOf(TB)); { Prints 8 } Writeln (BitSizeOf(TNB)); { Prints 32 } end.