- 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
mode
select a mode in exec file
Calling Sequence
mode(k) k = mode()
Description
Used exclusively inside an
exec-file or a scilab function mode(k)
allows to change
the information displayed during the execution, depending on the value of
k
:
- k = 0
The new variable values are displayed if required (see help on semicolon or comma).
- k = -1
the exec file or scilab function executes silently. (this is the default value for scilab functions)
- k = 2
default value on scilab prompt.
Please notices that mode does not used at prompt, only in an exec-file or a scilab function.
- k = 1 or k = 3
each line of instructions is echoed preceded of the prompt(if possible). The new variable values are displayed if required. This is the default for exec files.
- k = 4 or k = 7
The new variable values are displayed if required, each line of instructions is echoed (if possible) and a prompt (>>) is issued after each line waiting for a carriage return .
If carriage return follows character "p" the execution is paused (see pause).
- k > 7
user mode. if you define your own mode, it is recommended to use a value > 100.
Line display is disabled for compiled scilab function (see comp). By default, Scilab functions are executed using the silent ("-1") mode.
functions in a function library are executed using "-1" mode.
Examples
// copy - paste in scilab function example_mode(level_mode) mode(level_mode) a = 3 disp(mode()); endfunction mode(2) example_mode(0) example_mode(-1) example_mode(2) example_mode(1) example_mode(3) example_mode(7) mode(2)
<< matrix | Scilab | mtlb_mode >> |