Post Reply 
48: Moving average with DOSUBS
06-12-2015, 04:03 PM
Post: #5
RE: 48: Moving average with DOSUBS
(06-12-2015 03:26 PM)John R. Graham Wrote:  
(06-12-2015 03:03 PM)Dave Britten Wrote:  Anyway, if anybody knows how to modify programs and convert them to/from lists, I'd still find that useful.
Convert the program to a string with →STR, modify to your heart's content, and then convert back to a program with OBJ→. This has the advantage that it forces a recompile of the program so that your changes are guaranteed to take effect.

Edit: I think I'm mis-remembering the compiling thing, which only applies to algebraics.

- John

That should work in most cases, including this one, but if the program has any non-UserRPL stuff in it, e.g. takeovers, externals, etc., then recompiling it from the string representation will probably either fail with an error, or store a broken program.

I could swear I saw some method to build/modify a program on the fly without doing any string conversions. Can't remember where I saw it, though. It may have been an algebraic-to-RPN converter, unless I'm imagining the existence of that too.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 48: Moving average with DOSUBS - Dave Britten - 06-12-2015 04:03 PM



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