Monday, April 27, 2009

v7.90.0145 - 2009-04-27 15:49

Publication of this update was unfortunately extensively delayed due to editing required, and workload of your blog author.

  • +++ Scripting: Added while loops. General syntax:
      while (expression) {
        statement(s);
      }
    The nested statement(s) are executed repeatedly, as long as the while expression evaluates to TRUE. The value of the expression is checked each time at the beginning of the loop. If the while expression evaluates to FALSE from the very beginning, the nested statement(s) won't even be run once.

    Remarks:
    - Parentheses around the expression are mandatory.
    - Curly braces around the statement block are mandatory
      (even if there is only one statement).

    Example 1: will show 1, then 2, then terminate the script.
      while ($i < 2) {$i++; echo $i;};

    Example 2:
      // will show 1, 2, 3, then terminate the script.
        $x = 3;
        $i = 1;
        while ($i <= $x) {
          echo $i;
          $i++;
        }

    Example 3
      // nested while blocks are okay
        $x = 3;
        $i = 1;
        while ($i <= $x) {
          $w = "Word";
          while ($w != "") {
            echo "$w No. $i";
            $w = "";
          }
          $i++;
        }

    Example 4: expression is FALSE, message will never show.
      while (1 == 2) {echo "Help!"};

  • + Scripting: Now the common increment syntax using the ++ (--) operator is supported.
    Examples:
      ::$i=5; $i++; echo $i; //6
      ::$i=5; $i--; echo $i; //4
      ::$i++; echo $i; //1
    Note that, unlike in some other languages, you cannot use $i++ as an argument. It can only be a single separate statement. A line like "::echo $i++;" will not work.
  • + SC getinfo got a new named argument "countitems".
      Syntax: getinfo("countitems")
        return: Number of items currently in the list.
      Example:
        echo getinfo("countitems");
  • + SC getinfo got a new named argument "focusedpos".
      Syntax: getinfo("focusedpos")
        return: Position of focused item from top (top = 1).
      Example:
        echo getinfo("focusedpos");
  • ! List: An sort order bug went undiscovered for a long time. E.g. when you sort the list on Ext/descending, then the Name column order is reversed (=descending) as well. However, on next restart (or re-open of the tab) you would get the Ext column descending but the Name column *ascending*! This would lead to confusion as to what file was the focused file, and other unwanted things. Fixed.
  • * List: Now, when renaming an item no File Info Tips are shown anymore. Before, it would happen that the tips covered the rename box or otherwise disturbed the user.