HP Forums
Hypothetical: 12C program editing - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Hypothetical: 12C program editing (/thread-19386.html)



Hypothetical: 12C program editing - brouhaha - 01-07-2023 05:53 AM

Suppose a new firmware version for the HP-12C added program editing via new INS and DEL features in program mode, which would insert or delete one program step at the current location.

if the program was already full (99 steps, step 99 not "g GTO 00", and you pressed INS, would you want the calculator to give an error and not change the program, or would you want it to silently delete step 99 ot make room for the new step?


RE: Hypothetical: 12C program editing - vaklaff - 01-07-2023 12:41 PM

The first, that would surprised me less. The principle of least astonishment…


RE: Hypothetical: 12C program editing - Dwight Sturrock - 01-07-2023 07:30 PM

Agreed. I would “want the calculator to give an error and not change the program”


RE: Hypothetical: 12C program editing - rprosperi - 01-07-2023 10:30 PM

I agree with Dwight and Vaklaff


RE: Hypothetical: 12C program editing - AndiGer - 01-07-2023 10:36 PM

My intuitive first thought: give an error. So I agree with the guys …


RE: Hypothetical: 12C program editing - Didier Lachieze - 01-08-2023 08:51 AM

It’s sibling the HP-11C returns Error 4 if you try to insert an instruction while having already reached the maximum 203 steps, so yes returning an Error 4 seems the right thing to do.


RE: Hypothetical: 12C program editing - lvt - 01-08-2023 11:42 AM

Replace the last line and give an error saying "memory full".


RE: Hypothetical: 12C program editing - Csaba Tizedes - 01-12-2023 05:57 PM

This hypothetical DEL means register rearrangement also, which is painfully not possible on the 12C (eg. I have a root finder, I type in f(x), later I type in a 7 steps shorter g(x) and I don't get back one storage register) .


RE: Hypothetical: 12C program editing - brouhaha - 01-12-2023 07:59 PM

The hypothetical DEL would free a register when possible.

Any GTO instructions in the program would be adjusted to keep the same targets.


RE: Hypothetical: 12C program editing - Csaba Tizedes - 01-12-2023 09:18 PM

The INS on 12C is not as simple as you wrote here. Eg. I want to INS one step, but you're not use all program memory but use all program steps with the current memory partitioning, it is possible to
1.) get an error message and nothing change
2.) get a message and you must to decide you'll change one storage register to 7 program steps or
3.) if you reached the 99 steps the another error message

Cs.


RE: Hypothetical: 12C program editing - brouhaha - 01-12-2023 11:27 PM

My hypothetical INS would potentially convert a register to program steps, changing the partitioning. If there were already the maximum number of program steps, it would result in Error 4.


RE: Hypothetical: 12C program editing - Csaba Tizedes - 01-13-2023 08:07 AM

(01-12-2023 11:27 PM)brouhaha Wrote:  My hypothetical INS would potentially convert a register to program steps, changing the partitioning. If there were already the maximum number of program steps, it would result in Error 4.

This is the possible worst method! What if your program requires ALL the currently available registers for proper running and your INS re-partitioning the memory (and decreases the number of storage registers)? Your program can't run.
Thats why DIM on 15C and all the scientific programmable TI's has PART command. You MUST to keep the original memory partitioning unless the user do not want to change.

Cs.


RE: Hypothetical: 12C program editing - brouhaha - 01-14-2023 12:13 AM

(01-13-2023 08:07 AM)Csaba Tizedes Wrote:  
(01-12-2023 11:27 PM)brouhaha Wrote:  My hypothetical INS would potentially convert a register to program steps, changing the partitioning. If there were already the maximum number of program steps, it would result in Error 4.

This is the possible worst method! What if your program requires ALL the currently available registers for proper running and your INS re-partitioning the memory (and decreases the number of storage registers)? Your program can't run.
Thats why DIM on 15C and all the scientific programmable TI's has PART command. You MUST to keep the original memory partitioning unless the user do not want to change.

Cs.

That's not how HP calculators of that era with automatic partitioning (HP-34C, HP-38E, HP-38C, HP-10C, HP-11C, HP-12C, HP-16C) work. They all will convert numbered registers to program steps automatically as the program grows, without any warning. On these calculators, the "MEM' function shows the current partitioning. On the HP-10C, HP-11C, HP-12C, and HP-16C, MEM will also show you how many program steps you can add before you will lose a numbered data register.

The calculators with manual partitioning (HP-41C series, HP-15C) are the exception, not the rule.

Changing the 12C to manual partitioning would require a huge amount of work.

In my opinion, changing the 12C to manual partitioning would fundamentally change the nature of 12C programming, and would not be what 12C users would expect.


RE: Hypothetical: 12C program editing - Csaba Tizedes - 01-14-2023 10:39 AM

(01-14-2023 12:13 AM)brouhaha Wrote:  The calculators with manual partitioning (HP-41C series, HP-15C) are the exception, not the rule.
Changing the 12C to manual partitioning would require a huge amount of work.

I'm sure if this is came from a HP developer in 80's they fired immediately.

(01-14-2023 12:13 AM)brouhaha Wrote:  In my opinion, changing the 12C to manual partitioning would fundamentally change the nature of 12C programming, and would not be what 12C users would expect.

I'm an user also and my expectations differ than other users. IMHO if you have originally something in your head, why do you asked? You think all the users want same as you want? 15C is the most advanced and yes, the memory particioning is the most important part, I'm sure the average user never find themself in this situation what I wrote above.

BTW: these stuffs not really important, implement what you want, the price of bread and butter not affected by your written code lines.

Cs.


RE: Hypothetical: 12C program editing - Eddie W. Shore - 01-14-2023 05:44 PM

My vote would be an error message, only to indicate the 99 steps are full.

I would also be in favor of doing away with "volatile" memory and just have a set amount of steps and a set amount of registers. For example, 99 steps and 20 memory registers, neither of these parameters change. HP 13C anyone?


RE: Hypothetical: 12C program editing - brouhaha - 01-14-2023 06:13 PM

(01-14-2023 05:44 PM)Eddie W. Shore Wrote:  I would also be in favor of doing away with "volatile" memory and just have a set amount of steps and a set amount of registers. For example, 99 steps and 20 memory registers, neither of these parameters change.

I wasn't going to bring it up, but I've already got that working in almost that way. There are always 20 registers, but the program still grows in steps of seven steps. However, it gets the seven new steps out of thin air, rather than by converting data registers. I thought it might be nice to keep the program variable sized, so that g MEM can still give you an idea of how big your program is.

On the other hand, if you'd rather have the program just always be 99 steps, that would be easy, and I could replace g MEM with another function.

The big question on program memory size is whether you want more of it. Would people find it annoying to always have to enter three digits for GTO non (and GTO . nnn)? Ot should it be normally two digits, with an optional key to enter more digits (like the 41C), perhaps GTO nn and GTO EEX nnn?

If there was a way to have multiple separate programs you could switch between, would you be happy with 99 steps per program, or would you want more?