The Museum of HP Calculators

HP Forum Archive 14

 Triangle 32SII - Bill PlattMessage #1 Posted by Norm Pageau on 25 Feb 2005, 11:46 a.m. Hi Bill I want to thank you for your help. The triangle program hangs up on INVALID (i) message. There is only one line in the program that has RTN (i) Am I misinterpeting this statement - help me if you can ?? Norm

 Re: Triangle 32SII - Bill PlattMessage #2 Posted by bill platt on 25 Feb 2005, 12:56 p.m.,in response to message #1 by Norm Pageau Hi Norm, The syntax "RTN (i)" is incorrect. "RTN" is a command with no parameters--it merely returns the program execution pointer to line 000. "(i)" is a functionparameter which says, 'use the value stored in variable "i" (or "I" as it is called in the 11c) to carry out the requested function.' For instance, RCL (i) will recall the value of a variable (A through Z, or the stats variables, or "i") for which the pointer is stored as a numeric value in "i". So, for this purpose, A=1, B=2, C=3....26=Z, 27="i", 28="n", 29="Sigmax" etc (see page 13-20). So, if you had "i" holding a value of "1", then RCL (i) would recall the value stored in variable A. (so if you had 2324 stored in A, then RCL (i) would return 2324 to the x register.) Similarly, if you have XEQ (i) {which would be GSB (i) in the 11c} then your program pointer would go to the subroutine named for whatever variable's pointer is stored in "i", so in this case, you would see the pointer move to LBL A. A value greater than the absolute value of 33 will cause an "invalid (i)" error. So, it sounds like somewhere your program is not properly initializing or feeding the variable "i". Let me know if this helps. regards, Bill

Go back to the main exhibit hall