Post Reply 
Bad Argument Value error message....
06-19-2017, 04:36 AM
Post: #1
Bad Argument Value error message....
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
Find all posts by this user
Quote this message in a reply
06-19-2017, 11:02 AM
Post: #2
RE: Bad Argument Value error message....
During the debug session, did a valid value for variable t exist prior to calling for the test on it?
Find all posts by this user
Quote this message in a reply
06-19-2017, 11:59 PM
Post: #3
RE: Bad Argument Value error message....
yes...it was 13....
Find all posts by this user
Quote this message in a reply
Post Reply 




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