Post Reply 
RPL program for HP Calculator
07-24-2016, 12:45 PM
Post: #2
RE: RPL program for HP Calculator
Hi Lexus17,

some comments to your program:

FOR i i NS 1. +
From what value up to (NS+1) ”i” is supposed to go to ?

No, the right syntax for the "FOR" statement is:

a b FOR j (don't use i because it may interfer with the imagenary unit) NEXT
a is the initial value for the index variable (here) j
b is the end value for the index variable (here) j

Your code fragment means value i on stack value NS on stack and NS is added to 1.
You have to look before the FOR what are limits of the index.


FOR j i 1. == 0.
What does this mean ? I’m lost in the conditions raised for i and j…

Your code fragment means: the index is j and the value of i is tested wether it is 1. or not. The "0." is set on stack (there is no connection to the testing before).

Show us the whole code and tell us for what this program is used, so we can help you, maybe.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RPL program for HP Calculator - Lexus17 - 07-22-2016, 01:35 PM
RE: RPL program for HP Calculator - peacecalc - 07-24-2016 12:45 PM



User(s) browsing this thread: 2 Guest(s)