Algorithmic syntax – Turning Technologies ExamView User Manual

Page 91

Advertising
background image

ExamView Test Generator

91

2

Enter a definition. Click

next to the definition to display a list of currently defined constants and keywords.

NOTE

You cannot use variable names when defining a user-defined function, but you can use pre-
defined constants and keywords.

3

Click OK to record your changes and close the New Algorithm window.

How to create or edit a new condition...

1

Enter a condition. Conditions do not need a name. Click

next to the condition to display a list of currently defined

variables, constants, and keywords.

NOTE

Conditions always evaluate to TRUE or FALSE. Any numeric expression can be used for a
condition. If it evaluates to non-zero, it is interpreted as TRUE. If it evaluates to zero, it is
interpreted as FALSE.

2

Click OK to record your changes and close the New Algorithm window.

Algorithmic Syntax

A variable is a named object that can be modified during recalculation. Each variable has a unique name and a ”r;scope” or
context where it is identified. In the ExamView Test Generator, the scope of a variable is either limited to a single question, a
narrative and all questions linked to it, or to a matching group and all questions within that matching group.

All variables are one of the following types:

int

integer (positive and negative whole numbers and zero)

double

double-precision floating point (has fractional part)

string

characters or letters

A variable name must begin with an alphabetic character, cannot be longer than 40 characters, and cannot contain characters
other than alphabetic characters, numeric characters, and the underscore.

An expression is a mathematical, logical, or string phrase that contains constants, variables, operators, and keywords. An
expression is used to define a variable.

EXAMPLE

y = x + 8

In this example, ”r;y” is a variable being defined, ”r;x” is a variable already defined, ”r;+” is an
arithmetic operator to do addition, and ”r;8” is a numeric constant. You do not have to explicitly
assign a type to any variable or constant. The program does that for you.

ExamView Test Generator uses the following arithmetic operators:

+

Addition (can also concatenate two string variables or constants)

turningtechnologies.com/user-guides

Advertising