Bad Argument Value error message.... - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Bad Argument Value error message.... (/thread-8528.html) |
Bad Argument Value error message.... - webmasterpdx - 06-19-2017 04:36 AM 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 RE: Bad Argument Value error message.... - DrD - 06-19-2017 11:02 AM During the debug session, did a valid value for variable t exist prior to calling for the test on it? RE: Bad Argument Value error message.... - webmasterpdx - 06-19-2017 11:59 PM yes...it was 13.... |