DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

No syntax error for too many variables in ValMax()

A word of caution ... If you try this :

         MsgBox ValMax (1,2,3,4)

 

You may be surprised that the answer is 2, and there are no syntax errors flagged by DiaDem 2010 SP1.

 

The code needs to read :

         MsgBox ValMax ( ValMax(1,2) , ValMax(3,4) ).

0 Kudos
Message 1 of 3
(3,474 Views)

Hello Colin,

 

The function works correctly according to the help system, but I agree that it should issue an error message when more than two parameters are entered. I have forwarded this to the DIAdem R&D team to create a fix for the next release of DIAdem that will display an error message when more than two parameters are entered for ValMax.

 

Thank you for the notice.

 

Command: ValMax

Determines the greater of two numbers.

ReturnValue = ValMax(Value, Value)

Input Parameters

Value Specifies a numerical value.
Value Specifies a numerical value.

Return Parameters

ReturnValue The return value is a Real variable type.
Otmar D. Foehner
0 Kudos
Message 2 of 3
(3,465 Views)

Hi Colin,

 

I always use MinV() and MaxV() personally.  They complain if you try to use more than 2 parameters.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 3
(3,462 Views)