12C vs 11C program, 11C not working
12-17-2018, 07:42 PM (This post was last modified: 12-17-2018 09:22 PM by Dieter.)
Post: #8
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: 12C vs 11C program, 11C not working
(12-17-2018 12:13 PM)calcphil12c11c Wrote:  That works! Using ENTER now follows the 12C program.

So the 11C simulator is buggy.

(12-17-2018 12:13 PM)calcphil12c11c Wrote:  Can't use the x<0 as the 12C does not have that function.

Sure, that's why I suggested this for the 11C.

But on the 11C you also have an ABS command, so simply replace the three lines that do the test with ABS. This does the same (if negative, make it positive), and you don't have any problems with the simulator bug.

BTW, I suggested "x² √x" as an ABS substitute on the 12C. But the 12C also does not have an x² command, so it's ENTER x √x instead. My bad.

But once again: you do not need all this! It's good practice to end an 12C program with GTO 00 (or an 11C program with RTN). This way the program stops and returns to the program start. The next [R/S] will then restart it from the beginning again. That's a big advantage especially for the 12C. If you observe this good tradition of 12C programming you can re-run a program as often as you like, without any further interaction. That's why I suggested the programs in post #6. They are shorter and do the right thing automatically. No loop, no GTO required, and also no storage registers.

BTW, on the 12C you also do not have to type "GTO 00" manually to reset the program. Simply press f[CL PRGM] in run mode. This resets the program to step 00. Without clearing the program, of course. ;-)

(12-17-2018 12:13 PM)calcphil12c11c Wrote:  *If this really happens it's a bug in the simulator as on a real hardware 11C the [R/S] key enables stack lift.*

So on a 'real' 11C the R/S enables a stack lift? Just want to know please.

Almost all classic HP RPN programmable calculators behave this way. The only exception I know of is the HP25(C) where indeed an ENTER is required. Some users consider this a bug in the HP25 firmware as this is not the way such a calculator should behave.

Finally, here is another version for the 11C that converts both ways, gallons to liters and vice versa. Rule: gallones are positive, liters are negative.

Code:
LBL C x<0? 1/x 3 , 7 8 5 4 1 2 x x<0? 1/x CHS RTN

Edit: fixed an eror – the CHS command was in the wrong position.

3 f[A] => –11,3562   // 3 gallons are 11,356 liters
f[A] =>    3,0000   // 11,356 liters are 3 gallons
f[A] => –11,3562  //  etc.
...

–5 f[A] =>   1,3209  //  5 liters are 1,32 gallons

Once run, you can also press [R/S] instead of f[A].

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread 12C vs 11C program, 11C not working - calcphil12c11c - 12-16-2018, 03:07 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-16-2018, 10:03 PM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-16-2018, 11:31 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-17-2018, 08:39 AM RE: 12C vs 11C program, 11C not working - Thomas Klemm - 12-17-2018, 05:11 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-17-2018, 12:13 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-17-2018 07:42 PM RE: 12C vs 11C program, 11C not working - ijabbott - 12-17-2018, 08:38 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-17-2018, 09:04 PM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-17-2018, 11:59 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-18-2018, 08:50 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-18-2018, 11:55 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 01-09-2019, 04:19 AM

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