[Scilab-users] All variables in scilab.ini/.scilab startup file turn protected? About predef() (1)

Clément David clement.david at scilab-enterprises.com
Tue Aug 18 08:44:43 CEST 2015


Hi Samuel,

Yep I confirm this behavior and it seems related to a scope management
change (issue or not). The point is : scilab.ini seems to be loaded on
a parent scope to avoid any predef settings.

```
=== scilab.ini ===
a=1 // define a variable "a"

  === Console ===
  a=2 // I re-define a the "a" variable with a new value
  clear a // I clear the "a" variable on the current scope
  a // the "a" variable comes from the parent scope
```

Do not hesitate to file a bug if this behavior does not fill your
needs.

Regards,

--
Clément

Le jeudi 06 août 2015 à 18:37 +0200, Samuel Gougeon a écrit :
> Le 06/08/2015 18:21, Samuel Gougeon a écrit :
> >  .../...
> > Could anyone confirm this behavior? Here is the test:
> > 
> > edit(SCIHOME+"/scilab.ini")
> > //add the line
> > a=1
> > // in the file. Save it. Quit and restart Scilab. In the new 
> > session, try
> > a    // should display 1
> > clear a   // could display a warning. Nothing is display (reported 
> > as http://bugzilla.scilab.org/9709 ?)
> > a    // still here. Not deleted = protected
> Even not. A piece of surealism, a=1 being written in scilab.ini:
> 
> Startup execution:
>   loading initial environment
> Warning : redefining function: head_comments           . Use 
> funcprot(0) to avoid this message
> ------------------------------------------------------------
> This is alpha version: avoid using in production
> but please report any problem at http://bugzilla.scilab.org.
> Thank you!
> ------------------------------------------------------------
> 
> --> a
> a  = 
>     1.
> --> clear a
> --> a
> a  = 
>     1.
> 
> --> a=2   // overwritable?!
> a  = 
>     2.        // it looks that yes!
> --> a
> a  = 
>     2.       // not just a display issue..
> 
> --> clear a   // the last experience that should not be done...
> --> a             
> a  = 
>     1.               That's a ghost!!
> 
> --> a*2   // what should be expect: 2 or 4?
>  ans  =
>     2.
> 
> Any confirmation welcome.
> SG
> 
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list