Variables

XJEase uses variables in the same way as most programming languages. Variables must first be defined and can then be used in statements and expressions to store information and control the flow of programs. The operations that can be performed on a variable depend on the variable's type.

Variable Names

Variable names can be of any length, but they must begin with a letter or an underscore.

Valid characters for variable names are

  • Lower case alphabet (a..z)
  • Upper case alphabet (A..Z)
  • Numeric characters (0..9)
  • Underscore character (_)

Examples

INT aVariable;            // A simple variable name
INT _This_Is_A_Variable;  // A variable name beginning with an underscore
INT anotherVariable1;     // Two variable names with numeric characters
INT anotherVariable2;
STRING stringVariable;    // A simple string variable
FILE fileVariable;        // A file variable