Post Reply 
strange irem problem - SOLVED
01-20-2022, 09:35 PM (This post was last modified: 01-21-2022 01:26 AM by tgallo.)
Post: #1
strange irem problem - SOLVED
I have a program that runs fine on my calc but doesn't in the virtual calc. I narrowed it down to the irem function.

rem := irem(integer,10);

if I step through the program I check the following values right after this line is executed:

integer = 45
irem(45,10) = 5 <--- just checking irem returns proper value if given non-variable input
rem = integer

what does that even mean? rem should equal 5

Another strange thing is that OCCASIONALLY it works.
Find all posts by this user
Quote this message in a reply
01-20-2022, 10:08 PM (This post was last modified: 01-20-2022 10:10 PM by Joe Horn.)
Post: #2
RE: strange irem problem
Just a guess Huh, but does the same problem occur if you name your function something other than 'rem'? In all recent firmware versions, 'rem' is a built-in function, so there might be a name conflict.

EDIT: Another problem: 'integer' is a reserved word. Don't use it as a variable name.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
01-20-2022, 10:32 PM
Post: #3
RE: strange irem problem
I thought that maybe the problem was with integer so I had already replaced it with integ. I replaced rem with remain and it still fails. I use this code in several games I have written and they worked fine in both the real calc and the virtual up until recently. The thing that has changed is I am using the newest virtual version and I am also using a new PC.

Works fine in the latest firmware on the actual calc.
Find all posts by this user
Quote this message in a reply
01-20-2022, 11:29 PM
Post: #4
RE: strange irem problem
Could not reproduce it, but maybe you should qualify what’s “last version”.
My virtual Prime version is 2.1.14584 (iOS).

I’m trying to find clues…
Is your program à CAS program?
If yes, is it really needed? Did you check that you don’t share calls between Home and CAS ?
If not, why not using MOD operator?

Regards,
Thibault

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
Find all posts by this user
Quote this message in a reply
01-20-2022, 11:54 PM
Post: #5
RE: strange irem problem
version is 2.1.14596

my knowledge of the Prime could be better. I don't know what a CAS program is. I just started writing games for it intermittently since it was released

http://my.tbaytel.net/tgallo/hp%20prime/
Find all posts by this user
Quote this message in a reply
01-21-2022, 01:02 AM
Post: #6
RE: strange irem problem
I just tried 2 other versions of the Virtual Calc and the same thing happens. Interesting to note though.....when I first open the calc it actually runs fine. Then it will fail any repeated attempts.
Find all posts by this user
Quote this message in a reply
01-21-2022, 01:21 AM
Post: #7
RE: strange irem problem
I figured it out!!!

I figure since none of the virtual calcs worked ..even the ones that worked before it must be my new PC. It is running Win 11. If I run the calc in Win 8 compatibility mode it works!!!
Find all posts by this user
Quote this message in a reply
Post Reply 




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