Six ways of assigning a value after an operation already done:

  1. The older way: $set $x=3.3 $mult 3 gives the value 9.9
    • not very readable
  2. The long way: $set $x=3.3 $modify($x).mult(3) gives the value 9.9
  3. The trick way: $set $x=$NULL.plus(3.3).mult(3) gives the value 9.9
  4. The newer way: $setval $x=$mkvar(3.3).mult(3) gives the value 9.9 (have to use $setval for now)
    • more readable, even though slightly longer
  5. The future way: $set $x=$mkvar(3.3).mult(3) gives the value 9.9
  6. Future compact way having first defined $V function as $V=$mkvar($V_val)||$parameters $V V_val
    Use this with: $set $x=$V(3.3).mult(3) gives the value $V(3.3).mult(3)
    • Good if code needs to be compact

Four ways of printing a value with an operation already done on it:

  1. The older way: $( 33.3 $mult 3 $) gives the value 99.9
    • not very readable
  2. The long way: $set $x=33.3 $x.mult(3) gives the value 99.9
  3. The trick way: $NULL.plus(33.3).mult(3) gives the value 99.9
  4. The newer way: $mkvar(33.3).mult(3) gives the value 99.9
    • more readable, even though slightly longer
  5. Future compact way having first defined $V function as $V=$mkvar($V_val)||$parameters $V V_val
    Use this with: $V(3.3).mult(3) gives the value (3.3).mult(3) 33.3
    • Good if code needs to be compact