[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
* Multiplication
exp1 * exp2 Multiplication (binary operator)
exp1 any expression
exp2 any expression
* performs multiplication. Two examples:
i = 6 * 7; # i == 42
x = 3.4 * 5; # x == 17.0
/ Division operator
exp1 / exp2 Real division
exp1 Any expression
exp2 Any expression not equal to 0
The / operator performs real division, yielding a real result. For
example, 22.0 / 5.0 is 4.4.
If both expression are integer, / performs integer division, and yields
an integer value. For example, 22 / 5 is 4.
% Modulus operator
x % y Produces the remainder when x is divided by y
The % operator produces the remainder of x divided by y.
z = 10 % 3 # z = 1
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson