%WMIN

<< Click to Display Table of Contents >>

Navigation:  Reference > Functions >

%WMIN

This function assigns a values to responses in an mvar or svar depending on the minimum value found in a list of values.

Forms of use:

DM mvar = %WMIN(list),

DS svar = %WMIN(list),

The list should contain two or more arithmetic expressions separated by commas.

The response relating to the smallest value in the list is set, all other responses are not set.

If two or more values share the smallest number then each response with the smallest value will be set.

If the destination is an svar only the first smallest 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 %WMIN function:

dm $mbig=%wmin(0.0,$w4,$w5),

dm $mitbb=%wmin($i1,$i2*2,$i3*3),

ds $scell=%wmin(#1(c1,r1),#1(c1,r2)),