Share this page

# else

Provides an alternate statement for an if condition. In an if statement, if the expression is true, then if's statement is executed. If an else clause is given and if the expression is false, then the else's statement is executed.

    if( expression ) statement1;
    else statement2;

## Example

The following example tests whether characters with the ascii values 107 and 22 are alpha-numeric. If not, the else clause prints a suitable message.

        if (isalpha(107))
            lr_output_message ("The value 107 is %c", 107);
        else
            lr_output_message ("The value 107 is non-alphabetic");
        if (isalpha(22))
            lr_output_message ("The value 22 is %c", 22);
        else
            lr_output_message ("The value 22 is non-alphabetic");

    Example: Output:
    Action.c(4): The value 107 is k
    Action.c(11): The value 22 is non-alphabetic

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: