Byte Type

A Byte primitive type value stores an unsigned integer value in the range 0 through 255.

JADE defines a number of arithmetic operations that take Integer operands and return Integer results, as listed in the following table. A Byte value can be used in place of an Integer value as an operand because of the implicit type conversion that takes place before the expression is evaluated. The result of an arithmetic operation involving Byte values is an Integer.

Operator Description
+ Add
- Subtract
* Multiply
div Integer division (division with truncation; for example, 7 div 3 = 2)
^ Exponentiation (for example, i ^ 3 is i cubed)
mod Modulus (remainder after integer division)

These are binary (or dyadic) infix operators; that is, they are used with operands on both sides of the operator (for example, a+b). However, the + operator and - operator are also used as unary (or monadic) prefix operators, as listed in the following table.

Unary Prefix Operator Description
+a Sign identify
-a Sign inversion