select a result given a condition - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : MapleTA Package : Builtin : MapleTA/Builtin/if

MapleTA[Builtin][if] - select a result given a condition

Calling Sequence

if(condition, trueresult, falseresult)

Parameters

condition

-

boolean expression

trueresult

-

anything

falseresult

-

anything

Description

• 

The if command tests the given condition and returns trueresult if condition is true or nonzero.  Otherwise falseresult is returned.

• 

Note, because if is a recognized keyword in maple, it must be used with backwards-single-quotes around it.

Examples

MapleTA:-Builtin:-`if`1<2&comma;Red&comma;Blue

Red

(1)

See Also

MapleTA


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam