Int16 Data Type
Holds signed 16-bit (2-byte) integer values in the range −32,768 – +32,767.
Instructions
- Default value
- When you declare a variable of type Int16and do not initialize it, its default value is zero (0).
- Automatic conversions
- Int16widens to- Int32,- Int64,- Int128,- Real32,- Real64, or- Real128without risk of overflow.
- Type characters
- You can put the suffix i16(orI16) on the end of an integer literal. But there are no type characters for names.
Shared methods and properties
- Int16.Default As Int16
- Returns the default value, 0.
- Int16.Max As Int16
- Returns the maximum positive value.
- Int16.Min As Int16
- Returns the minimum negative value.
- Int16.Parse(str As String, Optional #format As Format) As Int16
- Tries to parse a string that shows as an integer.
- If #formatis not given or is#Null, it tries to parsestras a decimal (base-10) integer. Or you can make it clear withFormat.Base10.
- Int16.Size As Int32
- Returns the number of available bytes. This is always 2.
Examples
Dim foo As Int16