Turning Technologies ExamView User Manual

Page 92

Advertising
background image

ExamView Test Generator

92

-

Subtraction

*

Multiplication (use 3 * x instead of 3x)

/

Division

\

Integer division

%

Modulus

^

Power (use x^2 to represent x to the 2nd power)

!

Factorial

In addition to the arithmetic operators, ExamView Test Generator uses the following relational operators:

=

Equals

<

Less than

<=

Less than or equal to

>

Greater than

>=

Greater than or equal to

<>

Not equal to

&

And (you can also use "and")

|

Or (you can also use "or")

An expression that adds two strings together might look like this:

y = "Mrs. " + firstName + " " + lastName

In this case, ”r;Mrs. ”r; and the space between the first and last name are considered string constants. The variables firstName
and lastName would have already been defined as string variables. When the expression has been evaluated, y will be a string
variable.

ExamView Test Generator will not let you combine variables of different types when writing expressions, except where
variables of a particular type are expected.

EXAMPLE

For example, you could not write an expression like:

y = "Mrs. " + 8 * x

The program would not know whether the string constant ”r;Mrs. ”r; should be treated as a numeric
variable and added to the product of 8 times x, or whether the product of 8 * x should be treated as a
string variable and concatenated to ”r;Mrs. ”r; to give the string result y.

The list of keywords shows what types of variables or constants can be used as arguments (input) to the various functions, as
well as what type of variable gets created by the keyword or function (output).

ExamView Test Generator also lets you use parentheses to assign precedence to parts of your expressions when the program
evaluates them. The following list will help you when determining the order in which an expression is evaluated:

( )

parentheses

! + -

factorial, positive, negative

turningtechnologies.com/user-guides

Advertising