Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português do Brasil - Japanese -
Scilab help >> Scilab > predef

predef

variable protection

Calling Sequence

n=predef()
oldnew=predef(n)
oldnew=predef('all')
oldnew=predef('clear')

Description

Utility function used for defining "oldest" variables as "protected". Protected variables cannot be killed. They are not saved by the 'save' command. The "oldest" are those appearing last in the who('get').

predef() gets the number of protected variables

predef('a[ll]') sets all the variables protected, it also return the old and new value of protected variables number.

predef('c[lear]') unprotect all but the last 7 variables, it also return the old and new value of protected variables number.

predef(n) sets the max(n,7) last defined variables as protected, it also return the old and new value of protected variables number.

Remarks:

Variable ans created automatically when expressions are not assigned is never protected by predef('all').

A number of protected variables are set in the start-up file SCI/etc/scilab.start. User may in particular set its own predefined variables in user's startup files SCIHOME/.scilab and SCIHOME/scilab.ini

See Also

  • clear — kills variables
  • save — Save a variable or a serie of variables in a binary file
  • ans — answer
  • startup — startup file

Comments


Add a comment:
Please login to comment this page.

<< poly Scilab quit >>

Consortium Scilab (DIGITEO)
Scilab Enterprises

Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:09:25 CEST 2011