INTEGER

From QB64 Wiki

Revision as of 18:43, 21 August 2011 by Clippy (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

INTEGER is a 2 byte number type definition that can hold whole numerical values.


Syntax:

DIM variable AS INTEGER


  • Integers do not use decimal point values but will round those off to the nearest whole number.
  • Qbasic Integer values can range from -32768 to 32767 without an "overflow" error.
  • For larger Integer values Qbasic can use the LONG Integer values.
  • QB64 _UNSIGNED Integers can range from 0 to 65535.
  • QB64 _UNSIGNED _INTEGER64 values range from 0 to 18446744073709551615
  • Many Graphic programs require INTEGER arrays or DEFINT.
  • The QB variable type name suffix for integers is %. _INTEGER64 uses the && suffix.
  • _UNSIGNED Integer values can only be positive values or 0.
  • Values can be converted to 2 byte ASCII string values using MKI$ and back with CVI.


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page