Next: MATC Operators Up: MATC Matrix Languge Previous: MATC Variables

# MATC general flow control structures

The syntax of the flow control structures of MATC are given below.

    if ( expr ) expr; else expr;
    if ( expr )
    {
        expr;
        ...
        expr;
    } else {
        expr;
        ...
        expr;
    }

    for( i=vector ) expr;
    for( i=vector )
    {
        expr;
        ...
        expr;
    }

    while( expr ) expr;
    while( expr )
    {
        expr;
        ...
        expr;
    }