Triangle 32SII - Bill Platt



#3

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


#4

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime Triangle solver BruceH 29 2,805 11-28-2013, 12:03 AM
Last Post: Dale Reed
  HP Prime triangle solver oddity BruceH 0 340 10-13-2013, 09:08 PM
Last Post: BruceH
  Sierpinksi triangle on HP Prime Mic 1 382 09-15-2013, 09:08 AM
Last Post: CompSystems
  Bill Smithville NJ please contact me Don Shepherd 1 330 09-23-2012, 03:36 PM
Last Post: Bill (Smithville, NJ)
  Can we make'em like Bill and David? An open RPN? snaggs 23 1,791 09-18-2011, 04:15 PM
Last Post: Hugh Evans
  Triangle solver for WP34s fhub 38 2,940 08-29-2011, 07:26 PM
Last Post: Miguel Toro
  The Fibonacci Triangle - HP-38/39/40 GROB Question Marcus von Cube, Germany 9 1,000 01-02-2011, 06:41 PM
Last Post: Oliver Unter Ecker
  OT: For Sale: Bill Hewlett’s 1987 Chevy Suburban Steve Leibson 5 597 03-22-2010, 05:40 PM
Last Post: Etienne Victoria
  Bug in article 893? (HP 35s Triangle solver) Dave Britten 0 285 05-13-2009, 09:09 PM
Last Post: Dave Britten
  Bill & Dave DaveJ 1 323 10-22-2008, 12:57 AM
Last Post: Karl Schneider

Forum Jump: