InstallAware for Windows Installer
 

Mathematics

This command performs a numerical calculation.

Operand 1

Enter the first operand here. If a variable is used, be sure it represents an integer.

Real numbers are also allowed for the first four types of operations (as listed below).

Operand 2

Enter the second operand here. If a variable is used, be sure it represents an integer.

Real numbers are also allowed for the first four types of operations (as listed below).

Operation

Choose the type of arithmetic to perform. The following operations are supported with the following operands:

  • Add = Operand 1 + Operand 2.
  • Subtract = Operand 1 - Operand 2.
  • Multiply = Operand 1 * Operand 2.
  • Divide = Operand 1 / Operand 2.
  • Modulus = Operand 1 % Operand 2.
  • Bitwise OR = Operand 1 OR Operand 2.
  • Bitwise AND = Operand 1 AND Operand 2.
  • Bitwise XOR = Operand 1 XOR Operand 2.
  • Bitwise SHL = Shift Left Operand 1.
  • Bitwise SHR = Shift Right Operand 1.
  • Bitwise NOT = NOT Operand 1.
  • ASCII number from string character = Returns the numerical ASCII character code for the first character of Operand 1.
  • String character from ASCII number = Converts a numerical ASCII character code into an string character.
  • Set Random Number Generator Constants = Operand 1 sets Constant 1 and Operand 2 sets Constant 2.
  • Set Random Number Generator Seed = Accepts Operand 1 as the seed. Operand 2 is ignored.
  • Generate Random Number = Use Operand 1 (required) to define a maximum return value and Operand 2 (optional) to define a minimum return value. The default minimum value is 0. The result of this operation is equal to: Seed * Constant 1 + Constant 2.

Return Result in Variable

Type the variable that should hold the outcome of the operation.

 Notes

  • If an illegal operation is attempted, such as division by zero or string arithmetic, the result variable will hold an empty string.
  • To ensure a real number operation, at least one of the first two operands must have a digit separator as identified by a period (.), regardless of system locale.
  • To force a real number operation using operands where both operands may be perceived as integers, simply append .0 to one of the operands.