manual:chapter6:operators:cmd_ovr_xeq


Synopsis


Execute a program

Stack Diagram


Input Stack Output Stack
O1 see list under Description
Level 1 Level n Level 1

Legend

Type Operator
Parallel list processing Group 2
Affected by flags None

Description


The XEQ command executes the object on the top level of the stack.

The effect of the execution and the resulting output depends on the type of object being executed, as summarized by the following list.

  • Program: XEQ enters each object in the program:
    1. an unquoted Name is EVALuated;
    2. a Keyword is XEQted;
    3. other objects are put on the stack.
  • Other objects: XEQ puts the object on the stack.

Compatibility


This command is new in newRPL and does not exist in userRPL.

Usage


The command

1:                    « '16' √ »
……………………………………………………………………………………
XEQ

will perform the following steps:

  1. '16' (a symbolic expression) is put on the stack;
  2. (a keyword) is XEQted.

Resulting in

1:                         '√16'
……………………………………………………………………………………

Related Commands


Overloadable operators 26 3 NEW

Operator Short Description
Evaluation operators:
EVAL1 Evaluate one level NEW
EVAL Evaluate full depth
XEQ Execute NEW
→NUM Compute numeric result
Test operators:
== Equality test
Not equal test
< Less than test
Less than or equal test
> Greater than test
Greater than or equal test
CMP Comparison test (<0 if A<B, 0 if A==B, >0 if A>B) NEW
SAME Comparison test, true if objects are the same
ISTRUE True test NEW
Logical operators:
AND Logical AND
OR Logical OR
XOR Logical XOR
NOT Logical NOT
Mathematic operators:
+ Addition
- Subtraction
* Multiplication
/ Division
^ Power
XROOT Root
INV Inverse
NEG Negate/change sign
ABS Magnitude or absolute value
  • manual/chapter6/operators/cmd_ovr_xeq.txt
  • Last modified: 2019/11/17 08:35
  • by jojo1973