Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - byte signed byte (char) data type http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 byte                Signed byte (char) data type
------------------------------------------------------------------------------
 Syntax
   byte

 Arguments
   None.

 Features
   +----------------------------------------------------------------------+
   | Category             | numeric (integral)                            |
   | Size                 | 1 byte                                        |
   | Range                | -128 to 127 (or 0 to 255 if unsigned)         |
   | Parameter: value     | yes                                           |
   | Parameter: reference | yes                                           |
   | Parameter: const     | yes                                           |
   | Return               | yes                                           |
   +----------------------------------------------------------------------+

 Description
   The byte datatype is used to represent small numeric values.
   A byte data type variable may store uses only 8 bits (one byte) and can
   store any integer value from -128 to 127.

 Example
   #define EXAMPLE_DATATYPE
   #include example.hdr

   vardef
      byte bChar      := 'x'
      byte aNums[ 6 ] := -129, -128, -127, 0, 127, 128
   enddef
   
   proc Test_byte
   vardef
      byte n
   enddef
   ? bChar
   for n := 0 to 5
      ? aNums[ n ]
   next
   endproc

   proc main
   Test_byte()
   endproc

See Also: int uint

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson