Script Syntax, Variables, Numbers...

Features wanted...
Post Reply
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Script Syntax, Variables, Numbers...

Post by jacky »

So the new syntax when it comes to variable is pretty cool, and with the use of concatenation and all it looks pretty "standard":

Code: Select all

  $f = "foo";
  $b = "bar";
  $fb = $f."-".$b;
  msg '$fb = "'.$fb.'"';
But then, it becomes very tempting to use it with numbers the same way, only to be reminded you have to use command incr for that...

Code: Select all

  $n = 42;
  msg $n;
  $n = $n - 23;
  msg $n;
  incr $n, $n, -23;
  msg $n;
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script Syntax, Variables, Numbers...

Post by admin »

Yes, I see. Should be added some day. But is a can of worms because then you want all the number tricks and parentheses and binary math etc...

Post Reply