SQRT

Concept Link IconSee also

Square root function.

WebVue support - Yes.

Syntax

DblVal = SQRT(Val);

Return type: DOUBLE.

Argument

Meaning

Val

The value of which to take the square root. Any numeric type.

Execution

The square root of the value is returned. The value must be positive, else 0 will be returned.

Example

SUB Main()

DIM dblResult as Double;

DIM sngValue as Single;

 

sngValue = 4;

dblResult= SQRT (sngValue);

PRINT("Return value = ",dblResult);

'Display "Return value = 2"

END SUB