beautypg.com

Special functions – Turning Technologies ExamView User Manual

Page 106

background image

ExamView Test Generator

106

smixfracs*

string smixfracs(double numer, double denom)

After reducing the fraction numer / denom, this function will return a string as either a
whole number, or a fraction in the form "whole/numer/denom". When displayed, this
function will draw a small stacked fraction if necessary. If denom is 0, the function will
return "0".

EXAMPLE

smixfracs(22, 6)

will return

smixfracs(2, 6)

will return

srfracs*

string srfracs(double numer, double denom)

Reduces the fraction numer / denom. When displayed, this function will always draw a
small ratio in stacked fraction form. If denom is 0, the function will return "0".

EXAMPLE

srfracs(22, 6)

will return

srfracs(22, 11)

will return

* Keywords marked with an asterisk are for display only and cannot be used as parts of an expression.

Special Functions

ExamView Test Generator provides you with numerous special functions to use when defining variables, conditions, and user-
defined functions.

choose

expression choose(int which, expression arg1, expression arg2,

...)

- or -

expression choose(int which, list dataList)

This function will select the argument at the which location in the list of arguments. The
expression will be evaluated and returned. All of the arguments must be of the same type
(string or numeric). If which is greater than the number of arguments, the function will use
the remainder part of which to choose an argument.

EXAMPLE

which = rand(5)

choose(which, 1, 14, 3.2, 6, 9)

will return 3.2 when which = 3

- or -

which = rand(5)

listOfData = list(1, 14, 3.2, 6, 9)

choose(which, listOfData)

will return 9 when which = 5

turningtechnologies.com/user-guides