The following warnings occurred:
Warning [2] Undefined array key 90644 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90661 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90667 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90670 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90673 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90692 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90696 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90702 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90725 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90729 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90752 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90670 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90692 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90702 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90729 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 90752 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





HP 33S programming



#6

Hi everybody.

Don't you find rather silly that HP 33S has more than 30kb of memory and only 26 unduplicable labels?

I used to duplicate labels with my HP 11C, since the program searched forward for the label and, though there were only 16 of them (0÷9 + A÷F), memory was the real limit.

Now, it seems that HP designers have pulled the cover, leaving the other side naked: huge memory (who can fill all that bytes?) and poor programming practice. Add you cannot (as far as I know) operate a GTO directed to a specific line (a thing old calculators could do, backward and foreward). Do you know any workaround for this?

Regards.

-- Antonio


#7

Quote:
Don't you find rather silly that HP 33S has more than 30kb of memory and only 26 unduplicable labels

No, I don't. I see the 33s as a SLEP (service life extension program) for the 32sii concept. The extra memory (equiv to more like 7kb of 32sii) vastly improves the use of the keystroke model. Whereas on the 32sii you would frequently have to discard routines, on the 33s you don't have to.

Regarding repeated labels, this is, again, not a limitation brought on by the 33s; it is also there in the 32s, and so is the GTO line number limitation.

There was a conscious change going from voyager to pioneer, implementing labels rather than line numbers. Labels are more foolproof and easier to proofread.

I see line number GTO as a "poor programming practice" not the other way around. Line number GTO is a sloppy way to program, don't you think?

Regards,

Bill

Edited: 6 Apr 2006, 8:47 a.m.


#8

Quote:

I see line number GTO as a "poor programming practice" not the other way around. Line number GTO is a sloppy way to program, don't you think?


Yes, I do, but only if more than 26 GTO/XEQ could be available; if not, why not jumping directly to a well known step, saving at least that label?

Regards

-- Antonio


#9

I think you have to get over the obsession with the number of labels. You just have to accept that that is the limitation.

There is no "optimum" ratio between number of available labels and amount of memory. It is a programmable calculator, not a computer.

:-)

#10

Quote:
Don't you find rather silly that HP 33S has more than 30kb of memory and only 26 unduplicable labels?

I suspect that the original plan was for the 33S to have less RAM, but the larger RAM chips became so inexpensive (or, the smaller RAM chips became so hard to get) that they went with the large memory size instead.


Upgrading the 33S programming model to take advantage of the extra space was not deemed worthwhile. Maybe someone in the boardroom muttered "HP-42S" under their breath and everyone else took the hint.

- Thomas


#11

Quote:
Maybe someone in the boardroom muttered "HP-42S" under their breath and everyone
else took the hint.

I doubt anyone in the boardroom would know what an HP-42S is, much less anything about its capabilities.

#12

Hi, A. Maschio;

indeed, the LBL A to Z limitation is something we have to deal with... I do not like it, but in many cases, such limitations lead us to try finding other ways.

Last year, one thread brought this issue up and I suggested one possible workaround. If the program you are writing deals with math expressions and you have to conditionally evaluate one expression having two possibilities you could use the following sequence:

.....
F0001 LBL F start of program section
F0002 X=0? (or any other conditional)
F0003 GTO G
..... program steps with 1st. expression
(when X not equal zero)
Fxxxx GTO H
G0001 LBL G
..... program steps with 2nd. expression
(when X equals zero)
H0001 LBL H
..... remmaining, common part of the program
My suggestion is based on the HP33S ability to handle algebraic expressions as program steps. In this case, we may have an equivalent to the above steps as follows:
.....
F0001 LBL F start of program section
F0002 CF 0 (explainned below)
F0003 X=0? (the same conditional)
F0004 SF 0 (explainned below)
F0005 FC? 0 (explainned below)
F0006 1st. expression, algebraic notation (when X not equal zero)
F0007 FS? 0 (explainned below)
F0008 2nd. expression, algebraic notation (when X equals zero)
F0009 remaining, common part of the program
This way, labels G and H are not used and the program keeps functionality. The reason why flag 0 is used here is because the algebraic expressions in a program step return their final value when the related program step is executed. This is the same as if you press the [=] key at the end of the keystrokes used to evalualte the expression. So, if the first expression is evaluated, the value in the X-register you need to compare to zero in order to avoid the second expression to be evaluated too will not be there. Then we need to 'signal' if the conditional 'X=0?' returns true or false, and this is done in steps F0002 to F0004.

If the program performs other sort of operations that cannot be converted into algebraic manipulations and/or expressions, these suggestions may not apply.

Hope this helps.

Cheers.

Luiz (Brazil)


Edited: 6 Apr 2006, 2:01 p.m.


#13

Thanks, Luiz :-)

#14

Hi, Luiz --

Your snippet of code won't quite work exactly as written, because the HP-33S has no "is flag clear? [FC?]" function. Only the HP-41 and HP-42S have six functions -- SF, CF, FS?, FC?, FC?C, FS?C -- the rest, to my knowledge, have only three: SF, CF, FS?.

However, your idea is good, and I had incorporated something very similar in the final version of the the AC Power Transfer program for the HP-32S, HP-32SII, and HP-33S (RPN and ALG modes) in the MoHPC Software Library:

I replaced something like:

S0007  FS? 2 
S0008 GTO T
S0009 INPUT R
S0010 INPUT X
S0011 INPUT B
S0012 GTO C

T0001 LBL T
T0002 XEQ Z
T0003 CF 2
T0004 GTO C

C0001 LBL C

with the following:

S0007  FS? 2       
S0008 XEQ Z
S0009 FS? 2
S0010 GTO C
S0011 INPUT R
S0012 INPUT X
S0013 INPUT B
S0014 GTO C

C0001 LBL C
C0002 CF 2

thereby saving a line and a label. I'm rather proud of that program, and don't mind saying so:

  • It is modular -- each of the four labels serve as bona fide entry points to a specific part of functionality which can be directly accessed by the user.

  • Its input is user-friendly -- each input variable is prompted by INPUT, and the user may alter the entire stack for interactive calculations when the program is paused, without affecting the program's results.

  • It makes generous use of the the four models' complex-number functionality, which is admittedly awkward for interactive calculations, but very nice to have for programming.

  • The four versions I have prepared are optimized for the respective three calculator models, but the HP-32S version is completely portable to the HP-32SII and HP-33S.

I concede that only those in the field of power engineering (or studying it) would have any use for the program. However, some good programing concepts can be found in the code listings.

Cheers,

-- KS


Edited: 7 Apr 2006, 2:23 a.m.


#15

Hi, Karl;

thank you for your corrections. I completely forgot about that.

In your program (very well written, indeed) you ingeniously explore the HP33S resources. I remember I loaded your load-flow at the time you posted it and it ran smoothly. The kind of program structure I like seeing.

Anyway, you pointed out to another solution in my listing. Since the HP33S has 32KRAM, using a bit more program steps won't hurt, right? So...

...
F0001 LBL F start of program section
F0002 CF 0
F0003 SF 1 (complementary conditions)
F0004 X=0? (if X equals zero...)
F0005 SF 0 (then set flag 0)
F0006 FS? 0 (if flag 1 set, i.e., X equals 0...)
F0007 CF 1 (then clear flag 1)
F0008 FS? 1
F0009 1st. expression, algebraic notation (when X not equal zero)
F0010 FS? 0
F0011 2nd. expression, algebraic notation (when X equals zero)
F0012 remaining, common part of the program
Yes, I know it is a lot of extra steps, but the two labels are still preserved for future use. And if flags 0 and 1 have only local meanning, they can be used in other structures like this one.

Again, when you have few resources, you need more creativity.

Best regards.

Luiz (Brazil)

Edited: 7 Apr 2006, 4:03 a.m.

#16

Quote:
Only the HP-41 and HP-42S have six functions -- SF, CF, FS?, FC?, FC?C, FS?C -- the rest, to my knowledge, have only three: SF, CF, FS?.

Although, of course, all of the RPL models have all six of these commands.

Regards,
James


Possibly Related Threads…
Thread Author Replies Views Last Post
  33s - programming question Frank Rottgardt 4 1,465 05-15-2008, 08:27 PM
Last Post: Don Shepherd
  Help with Programming a HP 33S Eric 5 1,487 04-07-2006, 10:48 AM
Last Post: Vense Phonesouphan
  Integration Times "Old" 33s vs "New" 33s John Smitherman 21 5,080 12-14-2005, 12:04 AM
Last Post: Karl Schneider
  HP 33s programming Alexander Thorp 16 3,730 03-04-2005, 03:14 AM
Last Post: Tizedes Csaba [Hungary]
  Custom Programming vs. Pre-packaged programming Eddie Shore 3 1,434 01-24-2005, 03:42 AM
Last Post: Karl Schneider
  HP-33s variable programming Michel 5 1,599 10-25-2004, 09:33 AM
Last Post: bill platt
  33S: new programming strategy kc 3 1,159 05-15-2004, 12:23 PM
Last Post: bill platt
  hp 33s programming marcus channell 4 1,240 04-04-2004, 06:06 PM
Last Post: Norris
  Programming help and the 33S rob 8 1,965 03-03-2004, 08:40 AM
Last Post: bill platt

Forum Jump: