ShortInt

From SCAR Divi Manual
Revision as of 05:19, 19 December 2011 by Freddy (talk | contribs) (Created page with "==Availability== SCAR Divi 3.00 > Current ==Description== ShortInt is a basic type which can hold an 8-bits signed integer value (-128..127), any value outside of the range that...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Availability

SCAR Divi 3.00 > Current

Description

ShortInt is a basic type which can hold an 8-bits signed integer value (-128..127), any value outside of the range that is stored in it will overflow back into the range. Byte is the unsigned version of this type.

Example

var
  Value: ShortInt;

begin
  Value := 0;
  WriteLn(Value);
  Value := 127;
  WriteLn(Value);
  Value := -1;
  WriteLn(Value);
  Value := -128;
  WriteLn(Value);
  Value := 128;
  WriteLn(Value);
end.

Output:

0
127
-1
-128
-128

See Also