Post Reply 
How can PPL discover that CAS is disabled (ie Exam Mode)
07-11-2018, 07:46 AM (This post was last modified: 07-11-2018 07:49 AM by StephenG1CMZ.)
Post: #1
How can PPL discover that CAS is disabled (ie Exam Mode)
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?

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
07-12-2018, 06:27 AM
Post: #2
RE: How can PPL discover that CAS is disabled (ie Exam Mode)
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

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
07-12-2018, 11:11 AM
Post: #3
RE: How can PPL discover that CAS is disabled (ie Exam Mode)
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
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)