|
Use this function to compare two numeric expressions. The value of the mathematically lower expression is returned as result. |
|||||||||
![]() |
The type of result can be either "Integer" or "Float", depending on the type of the lower expression. | |||||||||
Syntax: |
||||||||||
{INT_VAR|FLO_VAR}= minimum({NUM_EXPR},{NUM_EXPR}) |
||||||||||
I/O parameters:
|
||||||||||
Return value: |
||||||||||
|
||||||||||
Example: |
||||||||||
Declaration of Variables | ||||||||||
10 ask(DOCU_FLOAT_1,"Please enter a value!") 20 ask(DOCU_FLOAT_2,"Please enter a second value!") 30 DOCU_FLOAT_3 = minimum(DOCU_FLOAT_1,DOCU_FLOAT_2) 40 put(DOCU_FLOAT_3) |
||||||||||
Result: (For DOCU_FLOAT_1 = 3,25 and DOCU_FLOAT_2 = 9) | ||||||||||
![]() |
||||||||||
![]() |
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 |