Types and Conversions

Indus is a strongly typed language. Like Java, the types of the Indus programming language are divided into two categories : primitive and reference types. However, unlike Java, interface is not a reference type in Indus. Instead, agent, component and ports are introduced as additional reference types in Indus.

Null is treated as a special literal that can be thought of as any reference type or can be casted to any reference type.

Primitive types
The Indus programming language defines primitive types to include
 * boolean : this can have exactly two values, true and false.
 * byte : this can hold signed 8 bit values ranging from -128 to 127.
 * short : this can hold signed 16 bit values ranging from -32768 to 32767.
 * int : this can hold signed 32 bit values
 * long : this can hold signed 64 bit values
 * char : this can hold unsigned 16 bit values ranging from 0 to 65535
 * float : this can hold 32 bit IEEE 754 floating point numbers
 * double : this can hold 64 bit IEEE 754 floating point numbers

Operators that act on primitive types are
 * Comparison operators (<, >, >=, <=, ==, !=) that produce a result of type boolean : apply to both integral (byte, short, int, long) and floating (float, double) types
 * Numerical operators (unary +/-, additive +/-, multiplicative *, %, /, increment ++ in both prefix and postfix, decrement -- in both prefix and postfix, signed and unsigned shift operators >>, <<, >>>, bitwise complement operator ~) that produce a result of type int or long : apply to both integral and floating types
 * Conditional operator ? :
 * Cast operator :
 * String concatenation operator :