Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
The Constant FAIL
Description
FAIL is a simple name in Maple which has several special properties.
FAIL is used by the boolean logic to mean an unknown or undetermined value. When used inside boolean expressions with and, or and not, it behaves like standard 3-valued logic.
Many functions return FAIL when they are unable to compute. For example, is, testeq, etc. will return FAIL when it cannot be determined with certainty whether the value is true or false.
As a boolean condition in an if or while statement or `if` expression, a FAIL has the same effect as a false. I.e. the if will take the else branch and the while will stop the iteration. Notice that when a FAIL value is possible, then
if expr then a else b end if;
is not equivalent to
if not expr then b else a end if;
Arithmetic with FAIL is valid but limited, and the value of FAIL is contagious over the basic arithmetic operations. In other words, expressions such as 2 + FAIL, FAIL - FAIL and FAIL/FAIL will all return FAIL.
Examples
See Also
boolean, initialconstants
Download Help Document