<< Click to Display Table of Contents >> Navigation: Reference > Functions > %WMAX |
This function assigns a values to responses in an mvar or svar depending on the maximum value found in a list of values.
Forms of use:
DM mvar = %WMAX(list),
DS svar = %WMAX(list),
The list should contain two or more arithmetic expressions separated by commas.
The response relating to the largest value in the list is set, all other responses are not set.
If two or more values share the largest number then each response with the largest value will be set.
If the destination is an svar only the first largest value is used.
U (undefined) values are ignored in the list. If all the values are U (undefined) the mvar or svar will be empty.
IMPORTANT: the number of values listed must be the same as the number of responses in the mvar or svar.
Examples of %WMAX function:
dm $mbig=%wmax(5.0,$w4,$w5),
dm $mitbb=%wmax($i1,$i2*2,$i3*3),
ds $scell=%wmax(#1(c1,r1),#1(c1,r2)),