[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
function SizeOf (var x): SizeType; |
Returns the size of a type or variable in bytes.
`SizeOf' can be applied to expressions and type names. If the argument is a polymorphic object, the size of its actual type is returned.
`SizeOf' is a UCSD Pascal extension.
program SizeOfDemo; var a: Integer; b: array [1 .. 8] of Char; begin WriteLn (SizeOf (a)); { Size of an `Integer'; often 4 bytes. } WriteLn (SizeOf (Integer)); { The same. } WriteLn (SizeOf (b)) { Size of eight `Char's; usually 8 bytes. } end. |
section 9.26 BitSizeOf, section 9.5 AlignOf, section 9.286 TypeOf.