if - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

MapleTA[Builtin]

  

if

  

select a result given a condition

 

Calling Sequence

Parameters

Description

Examples

Compatibility

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)

Compatibility

• 

The MapleTA[Builtin][if] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

MapleTA

 


Download Help Document