<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello Wolfgang,<br>
      <br>
      Le 12/08/2015 08:50, SCHULZ Wolfgang a écrit :<br>
    </div>
    <blockquote
      cite="mid:07A8AF089844A549B0F0CCC727AF31AA5798EEFE@OVEKBG.ove.at"
      type="cite">
      <pre wrap="">Hello,
I tested the alpha version of SCILAB 6 and have a problem with the mode command:
mode(-1) - switches off the display of variable on the console - this works

But e.g. the mode(0) works differently in SCILAB 6. All comments and  lines of the source code are displayed.

Is this a bug??</pre>
    </blockquote>
    I was waiting for improvements about mode() -- mainly for paused
    and/or commands-echoing modes -- <br>
    so with Scilab 6, after your mail, i did an exhaustive checking of
    execution modes:<br>
     - with mode() in a function<br>
     - with mode() in a script run with exec(script.sce)<br>
     - with exec(script.sce, mode)<br>
    <br>
    I confirm that there are several changes:<br>
    <br>
    1) With <b>mode() in a function:</b><br>
    <br>
    Scilab 6.0.0-a1  / 5.5.2<br>
    ---------------<br>
    <tt>mode  vars     pause    commands</tt><tt><br>
    </tt><tt>      echo               echo</tt><tt><br>
    </tt><tt>-1:   </tt><tt><br>
    </tt><tt>0 :    x</tt><tt><br>
    </tt><tt>1 :    x</tt><tt><br>
    </tt><tt>2 :    x</tt><tt><br>
    </tt><tt>3 :    x</tt><tt><br>
    </tt><tt>4 : CANCELED</tt><tt><br>
    </tt><tt>5 :   x    </tt><tt><br>
    </tt><tt>6 : CANCELED CANCELED</tt><tt><br>
    </tt><tt>7 : CANCELED CANCELED</tt><tt><br>
    </tt><tt>8 : CANCELED</tt><tt><br>
    </tt><br>
    <b>Conclusions #1</b>: Only bad news:<br>
    <ol>
      <li><font color="#ff6600">There is no longer any paused mode</font>.<b>
        </b>This is a big regression. Killing every tool enabling
        debugging seems to be the rule for years now...<br>
      </li>
      <li><a href="http://bugzilla.scilab.org/12372">Commands echoing
          that was requested</a> is still unavailable. <br>
      </li>
    </ol>
    <p><b>2) mode() in a script.sce run with exec() or in exec("script.sce",
        mode)</b><br>
      <tt><br>
        Scilab 6.0.0-a1 / 5.5.2</tt><tt><br>
      </tt><tt>---------------</tt><tt><br>
      </tt><tt>mode  vars     pause  commands compact  Comments</tt><tt><br>
      </tt><tt>-1:    </tt><tt><br>
      </tt><tt>0 :    x               ADDED</tt><tt><br>
      </tt><tt>1 :    x                 x        x </tt><tt><br>
      </tt><tt>2 :    x               ADDED            (2)</tt><tt><br>
      </tt><tt>3 :    x                 x        </tt><tt><br>
      </tt><tt>4 : CANCELED                            (4)</tt><tt><br>
      </tt><tt>5 :    x                 x        x     (5)</tt><tt><br>
      </tt><tt>6 : CANCELED  CANCELED                  (6)</tt><tt><br>
      </tt><tt>7 : CANCELED  CANCELED CANCELED         (7)</tt><tt><br>
      </tt><tt>8 :    x      CANCELED                  </tt><tt><br>
      </tt><tt><br>
      </tt></p>
    <ul>
      <li><tt>(2) SUPPRESSED (OK): The commands lines were echoed with
          \n, that was useless and made very flufy output.</tt></li>
      <li><tt>(4) SUPPRESSED (OK): A message "Mode pause" was displayed,
          although there was no pause!</tt></li>
      <li><tt>(5) SUPPRESSED (OK): in exec(..,mode), a heading line
          "step-by-step mode: enter carriage return to proceed" was
          displayed, although there was no pause!</tt></li>
      <li><tt>(6) SUPPRESSED (OK): Each command line was replaced with
          an empty prompt ">>(nothing)"</tt></li>
      <li><tt>(7) SUPPRESSED (OK): Each echoed command line ">>
          command.." was prepended with a useless empty prompt
          ">>(nothing)\n"</tt><br>
      </li>
    </ul>
    <p><br>
      <b>Conclusions #2</b>: <br>
    </p>
    <ol>
      <li><font color="#33cc00">Inconsistent messages have been removed,
          as well as useless lines when echoing commands</font></li>
      <li><font color="#ff6600">There is no longer any paused mode</font>.<b>
        </b>So, now, it is everywhere! <br>
      </li>
      <li>This review has shown that effects with mode() in scripts or
        as exec option were exactly the same, while help pages for
        mode() and exec() were (and are still) inconsistent. The exec()
        help page should only point to the mode() one for its mode
        option.<br>
      </li>
      <li>There is no real systematic mapping of mode for concerned
        features: <br>
      </li>
      <ul>
        <li>echoing variables (not followed with ";")</li>
        <li>echoing commands</li>
        <li>paused mode</li>
        <li>compact output</li>
      </ul>
    </ol>
    <p>As it is quite common, a bit yes/no could be assigned to each
      feature, building the mode number. That's not look to be the case.
      So several modes do the same. And some useful combinations are
      missing.<br>
    </p>
    <p>I hope strongly that the disappearance of paused modes -- that
      are also useful in demos, with only bad and very heavy
      work-arounds -- , is a bug, not a choice.<br>
    </p>
    <p>As you see, to answer to your need, as long as the former 0 mode
      won't be restored, you may use <b>mode(8)</b> instead.<br>
    </p>
    <p>Best regards<br>
      Samuel<br>
    </p>
  </body>
</html>