Post Reply 
hp 28s - creating nested lists
02-20-2015, 02:15 PM
Post: #23
RE: hp 28s - creating nested lists
Aha.. that's probably it.
The 48/49 STEP syntax specifies:
Quote:If the argument of STEP is an algebraic expression or a name, it is automatically evaluated to a number.
But the 28 accepts only a real number, not a variable holding one.
So, just add EVAL before STEP (or even better, before DUP). That should do it.
Code:
\<<
  \-> n
  \<<
    1 2 n
    FOR i
      DUPN i EVAL DUP
    STEP
    n - DUP 0 <
    { NEG DUPN }
    { DROPN }
    IFTE
    n
  \>>
\>>

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
hp 28s - creating nested lists - mbrethen - 02-16-2015, 04:33 PM
RE: hp 28s - creating nested lists - Werner - 02-20-2015 02:15 PM



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