prmIsDefault Function

Determines whether the specified parameter for the current method has the default value.


int prmIsDefault(anytype argument)

Parameter

Description

Argument

The parameter to test.

1 if the default value for the parameter was used; otherwise, 0.

static void prmIsDefaultExample(Args _arg)
{
 
    void fn(boolean b = true, int j = 42)
    {
        ;
        if (prmIsDefault(b) == 1)
        {
            print "First parameter is using the default value.";
        }
 
        else
        {
            print "First parameter is not using the default value.";
        }
    }
    ;
    
    fn();
    fn(false);
    pause;
}

Community Additions

ADD
Show: