- Scilab Online Help
- Scilab
- Scilab keywords
- TMPDIR
- abort
- add_demo
- argn
- banner
- boolean
- break
- clear
- clearfun
- clearglobal
- comp
- continue
- debug
- delbpt
- dispbpt
- edit
- errcatch
- errclear
- error
- error_table
- exists
- exit
- external
- extraction
- format
- funcprot
- funptr
- getdebuginfo
- getmd5
- getmemory
- getmodules
- getos
- getscilabmode
- getshell
- getvariablesonstack
- getversion
- gstacksize
- ieee
- insertion
- intppty
- inv_coeff
- iserror
- isglobal
- lasterror
- macr2lst
- macr2tree
- matrices
- matrix
- mode
- mtlb_mode
- names
- newfun
- null
- pause
- perl
- poly
- predef
- quit
- rational
- readgateway
- resume
- sciargs
- scilab
- setbpt
- stacksize
- startup
- symbols
- testmatrix
- type
- typename
- user
- varn
- ver
- warning
- what
- where
- whereami
- who
- who_user
- whos
- with_atlas
- with_javasci
- with_macros_source
- with_module
- with_pvm
- with_texmacs
- with_tk
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
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
<< poly | Scilab | quit >> |