pascalabcnet/TestSamples/CompilationSamples/test_sizeof.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

31 lines
655 B
ObjectPascal

type
rec=record
x:integer;
y:real;
a:array[1..10] of integer;
//âîïðîñ: à êàê ïåðåäàòü ìàñèâ â íåóïðàâëÿåìûé êîä? òàêîé ìàñèâ íå ïåðåäàø!
end;
begin
writeln('integer types');
writeln(sizeof(boolean));
writeln(sizeof(byte));
writeln(sizeof(shortint));
writeln(sizeof(smallint));
writeln(sizeof(char));
writeln(sizeof(word));
writeln(sizeof(integer));//longint
writeln(sizeof(longword));//cardinal
writeln(sizeof(longint));//int64
writeln(sizeof(uint64));
writeln('float types');
writeln(sizeof(single));
writeln(sizeof(real));
writeln('value types');
writeln(sizeof(rec)*10/10);
readln;
end.