The break Statement - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Flow Control : break

The break Statement

 

Description

Examples

Description

• 

When the break statement is executed, the result is to exit from the innermost repetition (for/while/do) statement within which it occurs.

• 

After exit, execution proceeds, with the first statement following the repetition statement.

• 

It is an error if a break is executed in a context other than within a repetition statement.

• 

In Maple V Release 5.1 and earlier, break was just a Maple symbol. In Maple 6 and later, break is a keyword in the Maple language.

Examples

L := [1, 2, "abc", "a", 7.0, infinity]:

for x in L do
    if type(x, 'string') then
        print(x);
        break;
    end if;
end do;

abc

(1)

See Also

do

Maple keywords

next