Difference between revisions of "Int16"

From Xojo Documentation

m (1 revision)
 
m
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{DatatypeBox
 +
| name=Int16
 +
| platform=all
 +
}}
 +
{{Description
 +
|text=Used to store 16-bit integer values. The default value is 0. Generally you will use the Integer data type (equivalent to [[Int32]] on 32-bit apps or [[Int64]] on 64-bit apps) or [[UInteger]] (equivalent to [[UInt32]] on 32-bit apps or [[UInt64]] on 64-bit apps). This size-specific integer data type is available for use with external OS APIs.}}
  
 +
== Notes ==
 +
Int16 values can range from -32,768 to 32,767 and use 2 bytes.
  
=='''Description'''==
+
== See Also ==
An '''Int16''' is an intrinsic data type in REALbasic. It is a signed integer that uses two bytes of storage. It has a range of -32,768 to 32,767. The default value of an '''Int16''' is 0.
+
[[Integer]]
 
 
REALbasic offers both signed and unsigned integer data types that use one, two, four, or eight bytes of memory. The following table summaries these data types.
 
{| cellpadding="8" cellspacing="0" border="1"
 
 
 
! width=25%  style="background-color:#e0e0e0" | Data Type
 
 
 
! width=25%  style="background-color:#e0e0e0" | Number of Bytes
 
 
 
! width=25%  style="background-color:#e0e0e0" | Range
 
|-
 
|[[Int8|Int8]] 
 
 
 
|1
 
 
 
|-128 to 127
 
 
 
|-
 
|'''Int16'''
 
|2
 
 
 
|-32,768 to 32,767
 
 
 
|-
 
|[[Int32|Int32]] or [[Integer|Integer]]
 
|4
 
 
 
|-2,147,483,648 to 2,147,483,647
 
 
 
|-
 
|[[Int64|Int64]]
 
|8
 
 
 
|-2^63 to 2^63-1
 
 
 
|-
 
|[[UInt8|UInt8]] or [[Byte|Byte]]
 
|1
 
 
 
|0 to 255
 
 
 
|-
 
|[[UInt16|UInt16]]
 
|2
 
 
 
|0 to 65535
 
 
 
|-
 
|[[UInt32|UInt32]]
 
|4
 
 
 
|0 to 4,294,967,295
 
 
 
|-
 
|[[UInt64|UInt64]]
 
|8
 
 
 
|0 to 2^64-1
 
 
 
|-
 
|}
 
 
 
 
 
=='''See Also'''==
 
[[Boolean|Boolean]], [[Byte|Byte]], [[CFStringRef|CFStringRef]], [[Color|Color]], [[CString|CString]], [[Currency|Currency]], [[Delegate|Delegate]], [[Double|Double]], [[Int32|Int32]], [[Int64|Int64]], [[Integer|Integer]], [[OSType|OSType]], [[PString|PString]], [[Ptr|Ptr]], [[Short|Short]], [[Single|Single]], [[String|String]], [[UByte|UByte]], [[UInt8|UInt8]], [[UInt16|UInt16]], [[UInt32|UInt32]], [[UInt64|UInt64]], [[UShort|UShort]], [[Variant|Variant]], [[WindowPtr|WindowPtr]], [[WString|WString]] data types; [[-|-]], [[+|+]], [[*|*]], [[/|/]], [[<|<]], [[<=|<=]], [[=|=]], [[>=|>=]], [[>|>]], [[<>|<>]], [[|]], [[IsNumeric|IsNumeric]], [[Mod|Mod]], [[Str|Str]], [[Val|Val]], [[VarType|Vartype]], functions; [[Dim|Dim]] statement.
 
 
 
 
 
[[Category:Data_Types-Uncommon]]
 

Latest revision as of 19:34, 8 June 2018

Data Type


Used to store 16-bit integer values. The default value is 0. Generally you will use the Integer data type (equivalent to Int32 on 32-bit apps or Int64 on 64-bit apps) or UInteger (equivalent to UInt32 on 32-bit apps or UInt64 on 64-bit apps). This size-specific integer data type is available for use with external OS APIs.

Notes

Int16 values can range from -32,768 to 32,767 and use 2 bytes.

See Also

Integer