1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 07:25:53 +00:00
QB64-PE/internal/help/INTEGER.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

31 lines
1.4 KiB
Plaintext

'''INTEGER''' is a 2 byte number type definition that can hold whole numerical values.
{{PageSyntax}}
:: DIM ''variable'' AS INTEGER
* Integers do not use decimal point values but will round those off to the nearest even whole number.
* Qbasic Integer values can range from -32768 to 32767 without an &quot;overflow&quot; 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.
* Variable type suffix is % or ~% for [[_UNSIGNED]]. Suffix can also be placed after a literal or hexadecimal numerical value.
* [[LONG]] integers use the '''&amp;''' suffix and [[_INTEGER64]] use the '''&amp;&amp;''' suffix.
* Values can be converted to 2 byte [[ASCII]] string values using [[MKI$]] and back with [[CVI]].
* '''When a variable has not been assigned or has no type suffix, the value defaults to [[SINGLE]].'''
* '''Warning: Qbasic keyword names cannot be used as numerical variable names with or without the type suffix!'''
''See also:''
* [[DIM]], [[DEFINT]]
* [[LONG]], [[_INTEGER64]]
* [[LEN]], [[MKI$]], [[CVI]]
* [[_UNSIGNED]]
* [[Variable Types]]
* [[&amp;B]] (binary), [[&amp;O]] (octal), [[&amp;H]] (hexadecimal)
* [[\|Integer Division]], [[MOD]] (Integer remainder division)
{{PageNavigation}}