Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
05-08-2017, 01:32 PM
Post: #664
RE: newRPL: [UPDATED April 27-2017] Firmware for testing available for download
(05-08-2017 05:58 AM)The Shadow Wrote:  Thanks for your replies, Claudio.

I've noticed that GETI and PUTI aren't working right. When the index reaches the end of the list, it's supposed to loop back around to 1 - this is great for DO...UNTIL loops. Instead it just keeps growing and throws errors.

Also, what does EVAL1NEXT do?

GETI/PUTI are being rewritten as we speak: all those functions were written for lists only (before other objects were available), now they are being moved to a more generic composites library and rewritten to support vectors/matrices, etc. Just looked at the new code and they do proper wrapping and set the flag as they should.

EVAL1NEXT is internal, I'll probably remove its user-friendly name so it doesn't show up in autocomplete. It does EVAL1 on the next object in the runstream. It's used for user-defined functions with the syntax:
Code:
<< -> X Y 'X^2+Y^2+1' >>
Internally, they get compiled as something like:
Code:
<< -> X Y << EVAL1NEXT 'X^2+Y^2+1' >> >>
It's necessary so algebraic functions do proper argument replacement before returning a result. If that function is called FUNC, using 'FUNC(Z+1,4)' EVAL will EVAL each argument, then call the program FUNC. FUNC needs to do EVAL1 to guarantee the arguments are replaced in the expression, so it returns: '(Z+1)^2+4^2+1' as expected (provided Z doesn't exist, otherwise the first EVAL would do a fully recursive replace).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: [UPDATED April 27-2017] Firmware for testing available for download - Claudio L. - 05-08-2017 01:32 PM



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