Tuesday, September 16, 2008

v7.60.0012 - 2008-09-16 15:14

  • + Scripting: Now commenting at line ends is supported. Comments begin with a double-forward slash (outside of any quotes) and end at the end of the line.
    Examples:
      - $a = <xypath>; assert $a=="<xypath>"; //should not fail
      - $a = <xypath>; //assign XY path
          assert $a=="<xypath>"; //should not fail
      - "getinfo CountSelected"  // comment
          getinfo $count,        // comment
          "CountSelected";       // comment
          assert $count!=0,      // comment
          "You must select a file before running this script!"
  • + Scripting: Now block comments (aka C-style comments) are supported. They start with /* (outside of any quotes) and end with the next */ (outside of any quotes) and can span any number of lines.
    Examples:
      - /* This is
        a multi-line
        block comment
        */ msg "hi!";
      - msg /*they can be inserted anywhere!*/ "hi!" /* anytime */;

    Remarks on Comments
    ~~~~~~~~~~~~~~~~~~~
    (1) Line-end and block comments overwrite each other:
          ::msg "Hi!"; // /*this is not a block comment starting...
          ::msg /* //this is not a line end comment starting... */ "Hi!";
    (2) Make sure you don't nest block comments. It is easy to make
        this mistake if you are trying to comment out a large block of
        code:
          /*
          msg 'This is a test'; /* Will cause a problem */
          */
        This, however, will work since // overwrites the /* */ comment:
          //msg 'This is a test'; /* This comment is NO problem */
    (3) Comments are not supported in Quick Scripting! This is
        everywhere where no multiline scripts are possible: So they
        won't work in the Address Bar, PFA, Favorites...
  • + Scripting: Now you can nest expressions using parentheses, aka round brackets: ( ). There's no practical limit to nesting depth and superfluous parentheses are silently removed.
    Examples where parentheses are merely decor:
      ::msg "a" . "b";
      ::msg ("a" . "b");
      ::msg ("a") . ("b");
      ::msg (("a") . ("b"));
      ::msg ((("a") . ("b")));
      ::msg "a" . "b" . ();
        = ab
      ::msg "a" . ("b" . "c");
      ::msg ("a" . "b") . "c";
        = abc
      ::msg "a" == "a" . "a" == "b";
      ::msg ("a" == "a") . ("a" == "b");
        = 10
    Examples where parentheses actually make a difference:
      ::msg "a" == "a" . "a";
      ::msg ("a" == "a") . "a";
        = 1a
      ::msg "a" == ("a" . "a");
        = 0
    Examples for nesting errors:
      ::msg ("a" . "b"; // ')' missing!
        = ("a" . "b"
      ::msg "a" . "b"); // '(' missing!
        = a"b")
  • ! Icon Overlays were not always correctly auto-refreshed in Tree and List. Fix #2.