IIf Function

Shallagantino handaara korkaataancho hornyo irkire, lamente giddonni mitte assishsha guma qolanno.

Syntax:


IIf (Handaara, HandaaraHalaale, HandaaraXara)

Parameters:

Handaara: Shallagga hasiratto handaara. Handaara Halaale ikkite shallaganturo, assishsha HandaaraHalaale guma qoltanno, kuni ikka hoogiro kayinni, HandaaraXara guma qoltanno.

HandaaraHalaale, HandaaraXara: Korkaataanchu shallaggo irkidhe assishshate gumi gede higganno handaara.

note

IIf evaluates both ExpressionTrue and ExpressionFalse even if it returns only one of them. If one of the expressions results in error, the function returns the error. For example, do not use IIF to bypass a possible division by zero result.


Error codes:

5 Horiweelo aante woshsho

Example:


REM Returns the maximum of 3 values
Function Max (A As Double, B As Double, C, As Double) As Double
    Max = IIf( A >= B, A, B)
    Max = IIf( C >= Max, C, Max)
End Function
REM Bad usage of function IIf
Function Inverse(A As Double) As Double
    Inverse = IIf( A = 0, 0, 1/A )
End Function

If or Select Case statements

Switch function

Please support us!