[Scilab-users] mode() changes. Paused modes canceled. Commands echo not in functions.

Samuel Gougeon sgougeon at free.fr
Wed Aug 12 22:28:03 CEST 2015


Hello Wolfgang,

Le 12/08/2015 08:50, SCHULZ Wolfgang a écrit :
> 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??
I was waiting for improvements about mode() -- mainly for paused and/or 
commands-echoing modes --
so with Scilab 6, after your mail, i did an exhaustive checking of 
execution modes:
  - with mode() in a function
  - with mode() in a script run with exec(script.sce)
  - with exec(script.sce, mode)

I confirm that there are several changes:

1) With *mode() in a function:*

Scilab 6.0.0-a1  / 5.5.2
---------------
mode  vars     pause    commands
       echo               echo
-1:
0 :    x
1 :    x
2 :    x
3 :    x
4 : CANCELED
5 :   x
6 : CANCELED CANCELED
7 : CANCELED CANCELED
8 : CANCELED

*Conclusions #1*: Only bad news:

 1. There is no longer any paused mode.**This is a big regression.
    Killing every tool enabling debugging seems to be the rule for years
    now...
 2. Commands echoing that was requested
    <http://bugzilla.scilab.org/12372> is still unavailable.

*2) mode() in a script.sce run with exec() or in exec("script.sce", mode)*

Scilab 6.0.0-a1 / 5.5.2
---------------
mode  vars     pause  commands compact  Comments
-1:
0 :    x               ADDED
1 :    x                 x        x
2 :    x               ADDED            (2)
3 :    x                 x
4 : CANCELED                            (4)
5 :    x                 x        x     (5)
6 : CANCELED  CANCELED                  (6)
7 : CANCELED  CANCELED CANCELED         (7)
8 :    x      CANCELED

  * (2) SUPPRESSED (OK): The commands lines were echoed with \n, that
    was useless and made very flufy output.
  * (4) SUPPRESSED (OK): A message "Mode pause" was displayed, although
    there was no pause!
  * (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!
  * (6) SUPPRESSED (OK): Each command line was replaced with an empty
    prompt ">>(nothing)"
  * (7) SUPPRESSED (OK): Each echoed command line ">> command.." was
    prepended with a useless empty prompt ">>(nothing)\n"


*Conclusions #2*:

 1. Inconsistent messages have been removed, as well as useless lines
    when echoing commands
 2. There is no longer any paused mode.**So, now, it is everywhere!
 3. 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.
 4. There is no real systematic mapping of mode for concerned features:
      * echoing variables (not followed with ";")
      * echoing commands
      * paused mode
      * compact output

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.

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.

As you see, to answer to your need, as long as the former 0 mode won't 
be restored, you may use *mode(8)* instead.

Best regards
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150812/e8704675/attachment.htm>


More information about the users mailing list