EPOC   SDK Home Glossary   Previous Next Up

VALVECTOR


Contents


VAL — Converta numeric string to floating point number

Usage:      v=VAL(numeric string)

Returns the floating-point number corresponding to a numeric string.

The string must be a valid number e.g. not "5.6.7" or "196f". Expressions, such as "45.6*3.1", are not allowed. Scientific notation such as "1.3E10", is OK.

E.g. VAL("470.0") returns 470

See also EVAL.


VAR — Gets variance of a list of items

Usage:      v=VAR(list)
or      v=VAR(array(),element)

Returns the variance of a list of numeric items.

The list can be either:

or

When operating on an array, the first argument must be the array name followed by (). The second argument, separated from the first by a comma, is the number of array elements you wish to operate on for example m=VAR(arr(),3) would return the variance of elements arr(1), arr(2) and arr(3).

This function gives the sample variance, using the formula:

To convert to population variance, multiply the result by (n-1)/n


VECTOR — Jumps to a numbered label

Usage:

    VECTOR i%
          label1,label2,...,labelN
    ENDV

VECTOR i% jumps to label number i% in the list. If i% is 1 this will be the first label, and so on. The list is terminated by the ENDV statement. The list may spread over several lines, with a comma separating labels in any one line but no comma at the end of each line.

If i% is not in the range 1 to N, where N is the number of labels, the program continues with the statement after the ENDV statement.

See also GOTO.

EPOC       SDK Home Glossary   Previous Next Up