String functions – Turning Technologies ExamView User Manual
Page 99

ExamView Test Generator
99
rad
double rad(double x)
Converts an argument, x, in degrees to radians.
sec
double sec(double x)
Computes the secant of the argument, x. The angle is specified in radians.
sech
double sech(double x)
Computes the hyperbolic secant of the argument, x. This evaluates to 1 / cosh(x).
sin
double sin(double x)
Computes the sine of the argument, x. The angle is specified in radians. Values are
returned in the range -1 to 1 inclusive.
sinh
double sinh(double x)
Computes the hyperbolic sine of the argument, x.
tan
double tan(double x)
Computes the tangent of the argument, x. The angle is specified in radians.
tanh
double tanh(double x)
Computes the hyperbolic tangent of the argument, x. This evaluates to sinh(x) / cosh(x).
String Functions
ExamView Test Generator provides you with numerous pre-defined string functions to use when defining variables, conditions,
and user-defined functions.
asc
int asc(string x)
Computes the ascii value of the first character in the string. If the string is empty, it
returns 0.
chr
string chr(int x)
Returns a string character with the ASCII value of the argument, x. If x is less than 32 or
greater than 255, the function will return a question mark. You should use this function to
generate characters found only in the Symbol font. Once the variable is inserted into a
question or narrative, you need to highlight the variable and change it to Symbol font for it
to display properly.
instr
int instr(string x, string y)
Searches in the string, x, for the sub-string, y. If it finds it, the function will return the
position in the string, x, where the first occurrence of y was found (between 1 and the
length of string, x). If the substring is not found, the function returns FALSE (0).
lcase
string lcase(string x)
Converts the string argument, x, to lower case.
EXAMPLE
lcase("ExamView")
will return "examview"
turningtechnologies.com/user-guides