Section 8. Processing and Math Instructions
8-17
MaxSpa Function Example
This example uses MaxSpa to find the maximum value of the five elements
Temp(6) through Temp(10) and store the result in the variable MaxTemp.
MaxSpa(MaxTemp, 5, Temp(6))
MinSpa (Dest, Swath, Source)
Finds the minimum value in an array.
Syntax
MinSpa(Dest, Swath, Source)
Remarks
Find the minimum value in the given array and place the result in the variable
named in Dest. The Source must be a particular element in an array (e.g.,
Temp(1)); it is the first element in the array to check for the minimum. The
Swath is the number of elements to compare for the minimum.
Parameter
& Data Type
Enter
Dest
Variable
The variable in which to store the results of the instruction.
Swath
Constant
The number of values of the source array in which to search of the
minimum.
Source
Array
The name of the variable array that is the input for the instruction.
MinSpa Function Example
This example uses MinSpa to find the minimum value of the five elements
Temp(6) through Temp(10) and store the result in the variable MinTemp.
MinSpa(MinTemp, 5, Temp(6))
Mod
Divides two numbers and returns only the remainder.
Syntax
result = operand1 Mod operand2
Remarks
The modulus, or remainder, operator divides operand1 by operand2 (rounding
floating-point numbers to integers) and returns only the remainder as result.
For example, in the expression A = 19 Mod 6.7, A (which is result) equals 5.
The operands can be any numeric expression.
Mod Operator Example
The example uses the Mod operator to determine if a 4-digit year is a leap
year.
Содержание CR5000
Страница 39: ...Section 1 Installation and Maintenance 1 15 S A N Y O FIGURE 1 11 6 Removal of band clamp and battery ...
Страница 40: ...Section 1 Installation and Maintenance 1 16 This is a blank page ...
Страница 54: ...Section 2 Data Storage and Retrieval 2 14 This is a blank page ...
Страница 88: ...Section 4 CRBasic Native Language Programming 4 12 This is a blank page ...
Страница 94: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 172: ...Section 7 Measurement Instructions 7 46 This is a blank page ...
Страница 206: ......
Страница 236: ...Index Index 4 This is a blank page ...
Страница 237: ...This is a blank page ...