HP Forums

Full Version: Bad Argument Value error message....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I only recently got an HP Prime and only just started to program it. I'm an engineer and have used calculators in the past to do some pretty complex testing of signal processing algorithms or research in mathematics. Anyhow, I was trying to whip out a program to calculate Goldbach Primes for a given even integer greater than 2.
One instruction was as follows:

IF CAS.isPrime(t) THEN ........where t is an integer.
This line was giving me the message Bad Argument when I single stepped to this line in the debugger.
Then I tried running just:
CAS.isPrime(13) in the numeric view and it also gave me the Bad Argument message.
Then I put it in CAS mode, and it worked, but it also worked when I put it in Home mode.
Then when I went back into programming mode, it then worked this time.
It's like the first time I got it to work in CAS mode, it "fixed it" for good everywhere.

What am I missing here? Is there some secret decoder ring I need to get stuff to work?
Do I need to run all my programs in CAS mode the first time or what?

Thanks in advance.
-Donald
During the debug session, did a valid value for variable t exist prior to calling for the test on it?
yes...it was 13....
Reference URL's