[DOCUMENTATION] eval CMD - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: [DOCUMENTATION] eval CMD (/thread-7373.html) |
[DOCUMENTATION] eval CMD - compsystems - 12-05-2016 03:32 PM Hello hp-prime developer group I can not find information about the eval command in lower case, please attach it in the user guide or HELP menu Examples that can help document it. on HOME MODE the key [eval] put EVAL '4/2' [ENTER] ->'4/2' EVAL(Ans) ->2 on CAS MODE the key [eval] put eval type(set[1,2,3]) ->DOM_LIST eval(Ans) -> DOM_LIST //OK Eval does not evaluate constant identifiers, this is correct because it is within the symbolic environment with EVAL type(set[1,2,3]) ->DOM_LIST EVAL(Ans) -> 7 //OK or EVAL(DOM_LIST) -> 7 eval(DOM_LIST) -> DOM_LIST RE: Undocumented eval CMD - Tim Wessman - 12-05-2016 08:45 PM Code: enum gen_unary_types { You can take a look at the CAS source yourself and see exactly what is happening. Home simply evaluates everything down as far as it can go. The CAS has special handling to keep those special values like DOM_LIST as strings. Is there anything you are trying to say with this post? RE: Undocumented eval CMD - Han - 12-05-2016 09:27 PM Keep in mind that EVAL and eval are two separate commands. Most commands have only one form (uppercase). When a command exhibits different behavior when used as COMMAND vs. command, then this is often due to there being two different versions of the command (one for CAS and one for non-CAS). Unfortunately, the CAS view (in Textbook mode) seems to always display a command in uppercase (even when not typed in uppercase) which suggests that the two forms are the same when in fact they are not. |