|Re: Endless 35S loop, continued ...|
Message #4 Posted by Vieira, Luiz C. (Brazil) on 12 Oct 2007, 4:24 p.m.,
in response to message #1 by vq
Hi, Václav; (at least I hope this post is from you...)
about the endless loop and program structure. I know some programs may find an endless loop because of code OR argument error, i.e., either the code causes endless loops or the arguments force the code to do so. Of course, this would not lead the device itself to enter in a no-interruptible loop, i.e., a loop that could not be broken by some reset/restart key sequence. This is, surely, a bug and must be investigated.
Appart of that, I wrote John an e-mail mentioning another fact I noticed is related to data input. His original listing has the
following steps, step # included:
Based on John´s explanations, one can either enter tension steel only or both compression stell and tension steel. John wrote:
262. RCL Q
263. RCL O
264. C,T BAR SIZES
265. STO O
267. STO Q
20 R/S for tension steel only
16 ENTER 20 R/S for sizes of both compression steel (top) and tension steel (btm).
If we observe his listing, there is another problem there. Register Q contains compression steel value and register O contains tension steel value, both may also be already stored in calculator memory. A copy of both is brought back to the stack and if they are already there, one may simply keep them by pressing [R/S] and they will be stored back (steps B265 to B267). If we enter both new values, it will happen the same: the new values will override the old ones (again, steps B265 to B267). But if we enter only the tension steel and press [R/S], as John suggests, we will have the new tension value correctly stored in register O and
the previous tension steel value wrongly stored in register Q, overriding the one you actually want tokeep. For example, consider that you already have hipothetical values for tension stell and compression steel as follows: 12 and 18 (cannot tell if these are acceptable, just hipothetical). Let´s consider that you want to enter only the new value for tension steel, so the stack contents would be:
REGX REGY REGZ REGT
262. RCL Q 18 a b c a,b,c are placeholders
263. RCL O 12 18 a b Hipothetical values
264. C,T BAR SIZES 16 12 18 a You enter 16 only
265. STO O 16 12 18 a 16 correctly stored in O
266. R| 12 18 a 16 rolls down stk contents
267. STO Q 12 18 a 16 12 wrongly stored in Q
I am not sure about how would this affect program control, but it would surely disturb data organization. My suggestion would be a double stop: one for compression (press [R/S] to keep existing or key in new value then [R/S]) and another for tension (same thing: [R/S] to keep existing or key in new value then [R/S]).
I have already loaded the program and tested it step-by-step to a certain point, but I intend to add some modifications prior to run it straight. I'd not like to have the calculator stuck as it had already happened with some of you and have to key the program in, head to tail...
Also, I tested the VIEW(I) and VIEW(J) followed by PSE. The display always shows the contents of register (I+27) and returns INVALID (I) (or (J)), even when they are valid. If we remove the PSE and let the program to stop, it shows the correct register contents.
HP has definitely lost its way to design calculators... Bring AOC back, pleeeessss...
Edited: 12 Oct 2007, 4:44 p.m.