Word (??)

Words are 16-bit (two byte) unsigned integers with a range of 0 to 65535 ( 0 to 2^16-1).  The type-specifier character for a Word is: ??.

Word variables are identified by following the variable name with two question marks (i.e., var??), or by using the DEFWRD statement as described in the previous discussion of Integers.  You can also declare word variables using the WORD keyword with the DIM statement.  For example:

DIM I AS WORD

Word values effectively extend the positive range for Integer, but still only require two bytes for storage.

A C/C++ UINT16 and a Delphi word are equivalent to a PowerBASIC Word.

 

See Also

Byte (?)

Double-word (???)

Integers (%)

Long integers (&)

Quad integers (&&)