Show pageDiscussionOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ==== EVAL1 ==== ---- <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Evaluate an object, single pass </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^^^ | **O** | **→** | //see list under __Description__// ||| | //Level 1// | //→// | //Level n// | //...// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} |**Type**| [[manual:chapter5:basics#operators|Operator]] || |**Parallel list processing**| //Yes, but specific group is determined by the object being evaluated// || |**Affected by flags**| [[manual:appendix:flags#flag-70|-70]] | Global autosimplification rules | |:::| [[manual:appendix:flags#flag-71|-71]] | Application of **Group 1** autosimplification rules | |:::| [[manual:appendix:flags#flag-72|-72]] | Application of **Group 2** autosimplification rules | |:::| [[manual:appendix:flags#flag-73|-73]] | Application of **Group 3** autosimplification rules | |:::| [[manual:appendix:flags#flag-74|-74]] | Application of **Group 4** autosimplification rules | |:::| [[manual:appendix:flags#flag-75|-75]] | Application of **Group 5** autosimplification rules | |:::| [[manual:appendix:flags#flag-76|-76]] | Application of **Group 6** autosimplification rules | |:::| [[manual:appendix:flags#flag-77|-77]] | Application of **Group 7** autosimplification rules | |:::| [[manual:appendix:flags#flag-78|-78]] | Application of **Group 8** autosimplification rules | |:::| [[manual:appendix:flags#flag-103|-103]] | Complex results | </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''EVAL1'' command evaluates the object on the top level of the stack. The effect of the evaluation and the resulting output depends on the type of object being evaluated, as summarized by the following list. * **Local Name**: ''EVAL1'' //recalls// the content of the variable. * **Global Name**: ''EVAL1'' //calls// the content of a variable: - a __Name__ is ''EVAL''uated; - a __Program__ is ''EVAL''uated; - a __Directory__ becomes the current directory; - __other objects__ which are not lists are put on the stack. * **Program**: ''EVAL1'' //enters// each object in the program: - an [[manual:chapter6:dirs:cmd_unquoteid|unquoted]] __Name__ is ''EVAL''uated; - a __Keyword__ is ''[[manual:chapter6:operators:cmd_ovr_xeq|XEQ]]''ted; - __other objects__ which are not lists are put on the stack. * **Symbolic expression**: ''EVAL1'' //enters// each object in the expression: - a __Name__ is ''EVAL''uated; - a __Keyword__ is ''[[manual:chapter6:operators:cmd_ovr_xeq|XEQ]]''ted; - __other objects__ which are not lists are put on the stack. * **Other objects**: if they are not lists ''EVAL1'' puts them on the stack. * **List**: ''EVAL1'' //enters// each object in the list: - __any object__ is ''EVAL''uated according above mentioned rules. As a final step, ''EVAL1'' will perform numerical simplification according to the status of flags from [[manual:appendix:flags#flag-70|-70]] to [[manual:appendix:flags#flag-78|-78]]. If the final results The main difference from ''[[manual:chapter6:operators:cmd_ovr_eval|EVAL]]'' is that ''EVAL1'' performs only one step of the process described above, allowing evaluation of recursive formulas that would otherwise yield a ''Circular reference'' error. </callout> <callout type="danger" icon="true" title="Compatibility"> ---- This command is new in newRPL and does not exist in userRPL. </callout> <callout type="info" icon="true" title="Usage"> ---- If the following command is executed <code> 2: 'X+1' 1: 'X' …………………………………………………………………………………… STO </code> then the command <code> 1: 'X' …………………………………………………………………………………… EVAL </code> would return a ''Circular reference'' error. Instead <code> 1: 'X' …………………………………………………………………………………… EVAL1 </code> will result in <code> 1: 'X+1' …………………………………………………………………………………… </code> and further use of ''EVAL1'' will return ''%%'X+2'%%'', ''%%'X+3'%%'', et cetera. </callout> <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> ---- {{page>manual:chapter6:operators&nofooter&noeditbtn&inline}} </callout> manual/chapter6/operators/cmd_ovr_eval1.txt Last modified: 2019/11/17 08:24by jojo1973