"Iain Simpson" schrieb im Newsbeitrag
news:399cfe0d@newsgroups.ni.com...
>
> Hi,
>
> Is there anyway of acheiving an if, elseif command to return several types
> of status of a test depending on certain criteria?
> The only function I have found is the conditional ?: style which can only
> return one of two values.
>
> Regards,
> Iain
Hello Iain,
you can use ?: as followed to achieve elseif :
bool1 ? expr1 : (bool2 ? expr2 : expr3 )
is the same as :
if (bool1)
expr1;
elseif (bool2)
expr2;
else
expr3;
Greetings
Manfred