1
0
Fork 0
lazarus-tutorials/simple_examples/simple_types.pas

33 lines
764 B
ObjectPascal

program simple_types;
{$mode objfpc}{$H+}
const
pName='simple_types';
tab=#9;
var
smallInteger: SmallInt= -37;
started: boolean = false;
begin
WriteLn('This program is called ', tab, tab, '"', pName, '"', sLineBreak);
WriteLn('When initalised smallInteger has the value: ', smallInteger);
WriteLn('When initialized started has the value: ', started, sLineBreak);
smallInteger += 100;
WriteLn('After adding 100 to smallInteger its value is: ', smallInteger);
started:= not started;
WriteLn('Negating started gives it the new value: ', started, sLineBreak);
WriteLn('The highest value a SmallInt can store is: ', High(SmallInt));
WriteLn('The lowest value a SmallInt can store is: ', Low(SmallInt));
{$IFDEF WINDOWS}
readln;
{$ENDIF}
end.