|
|
This function returns the result of the square function. |
||||||
Syntax: |
|||||||
| {INT_VAR|FLO_VAR}= sqr({NUM_EXPR}) | |||||||
I/O parameters:
|
|||||||
Return value: |
|||||||
|
|||||||
Example: |
|||||||
| Declaration of Variables | |||||||
10 ask(DOCU_FLOAT_1,"Please enter a value!")
20 DOCU_FLOAT_2 = sqr(DOCU_FLOAT_1)
30 DOCU_STRING_1 = strprint("%f squared is equal to %f",
DOCU_FLOAT_1,DOCU_FLOAT_2)
40 put(DOCU_STRING_1)
|
|||||||
| Result: | |||||||
![]() |
|||||||
| In order to prevent errors, the float/double type must be used if results can be expected to be either very large or very small (<2^-31 or > 2^31). | |||||||
|
Functions and commands: Mathematics |