Difference between revisions of "Byte"

From SCAR Divi Manual
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
==Availability==
 +
SCAR Divi 3.00 > Current
 +
 
==Description==
 
==Description==
 
Byte is a basic type which can hold an 8-bits unsigned integer value (0..255), any value outside of the range that is stored in it will overflow back into the range. [[ShortInt]] is the signed version of this type.
 
Byte is a basic type which can hold an 8-bits unsigned integer value (0..255), any value outside of the range that is stored in it will overflow back into the range. [[ShortInt]] is the signed version of this type.
Line 27: Line 30:
 
==See Also==
 
==See Also==
 
*[[ShortInt]]
 
*[[ShortInt]]
*[[SmallInt]]
+
*[[Word]]
*[[Integer]]
+
*[[Cardinal]]
*[[Int64]]
 
  
 
[[Category:Types]]
 
[[Category:Types]]
 
[[Category:Basic Types]]
 
[[Category:Basic Types]]

Latest revision as of 17:00, 2 July 2011

Availability

SCAR Divi 3.00 > Current

Description

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

Example

var
  Value: Byte;

begin
  Value := 0;
  WriteLn(Value);
  Value := 255;
  WriteLn(Value);
  Value := -1;
  WriteLn(Value);
  Value := 256;
  WriteLn(Value);
end.

Output:

0
255
255
0

See Also