HP Forums

Full Version: How can PPL discover that CAS is disabled (ie Exam Mode)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the somewhat unlikely situation where CAS is disabled but user PPL programs remain enabled in exam mode (I assume that is possible), how can a PPL program discover that CAS is disabled?

Without knowing a good example, if we assume gcd() is a fast CAS function and GCD() a slow PPL function, can I write
Code:

CASE
CASenabled :  gcd() END;
PPLenabled : GCD() END;
DEFAULT my_own_gcd() END;
END:
What is the best way of detecting "CAS enabled"?
More generally, can PPL interrogate Exam mode to discover what is enabled and what is not?

How does Exam mode disable CAS - will gcd() not compile because the gcd() function is no longer defined, or is a run-time error generated?
Hello,

I would think that an IFERR around a known good CAS call would work...

local CasEnable= 1;
IFERR cas("1+1"); THEN CasEnable:= 0; END;

Might work. I have not tested it though...

Cyrille
You could check the color of one of the pixels near the top of the screen; if it's orange, you're in exam mode.

-road
Reference URL's