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.899999999999999
    • not very readable
  2. The long way: $set $x=3.3 $modify($x).mult(3) gives the value 9.899999999999999
  3. The trick way: $set $x=$NULL.plus(3.3).mult(3) gives the value 9.899999999999999
  4. The newer way: $setval $x=$mkvar(3.3).mult(3) gives the value 9.899999999999999 (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.899999999999999
  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.89999999999999
    • not very readable
  2. The long way: $set $x=33.3 $x.mult(3) gives the value 99.89999999999999
  3. The trick way: $NULL.plus(33.3).mult(3) gives the value 99.89999999999999
  4. The newer way: $mkvar(33.3).mult(3) gives the value 99.89999999999999
    • 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 9.899999999999999 33.3
    • Good if code needs to be compact