- Aide Scilab
- Scilab
- Mots clés Scilab
- TMPDIR
- abort
- argn
- banner
- boolean
- break
- clear
- clearglobal
- comp
- debug
- errcatch
- errclear
- error
- exists
- exit
- external
- extraction
- getos
- getshell
- gstacksize
- ieee
- insertion
- inv_coeff
- iserror
- isglobal
- macr2tree
- matrices
- matrix
- mode
- mtlb_mode
- names
- null
- pause
- perl
- poly
- predef
- quit
- rational
- resume
- sciargs
- scilab
- stacksize
- startup
- symbols
- testmatrix
- type
- typename
- user
- varn
- what
- where
- whereami
- who
- whos
- with_atlas
- with_javasci
- with_macros_source
- with_pvm
- add_demo
- clearfun
- continue
- delbpt
- dispbpt
- edit
- error_table
- format
- funcprot
- funptr
- getdebuginfo
- getmd5
- getmemory
- getmodules
- getscilabmode
- getvariablesonstack
- getversion
- intppty
- lasterror
- macr2lst
- newfun
- readgateway
- setbpt
- ver
- warning
- who_user
- with_module
- with_texmacs
- with_tk
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.
macr2lst
function to list conversion
Calling Sequence
[txt]=macr2lst(function-name)
Description
This primitive converts a compiled Scilab function function-name
into a list which codes the internal representation of
the function (reverse polish notation).
The first entry of the list is the function name, the second and third are respectively the vectors of left hand side variables and right hand side variables names. The following entries are either basic operation records either lists with contains the hierachical control structures like if , for, ...
Basic operation records are described by a character string vector whose first element represents the opcode.
op codes | meaning | parameters |
"0" | ignored opcode | none |
"1" | No more used | |
"2" | variable or function reference | variable name, #rhs, #lhs |
"3" | put a string in the stack | the string |
"4" | put am empty matrix in the stack | none |
"5" | apply an operation | operation code, #rhs,#lhs |
"6" | put a number in the stack | the number |
"12" | pause command | none |
"13" | break command | none |
"14" | abort command | none |
"15" | end of line mark | none |
"17" | quit command | none |
"18" | named variable | variable name |
"19" | create recursive index structure | path length, number of final indices |
"20" | function call | function name, #rhs, #lhs |
"23" | create variable from name | variable name |
"24" | put a variable with type 0 in the stack | none |
"25" | profile record | number of call, time spend |
"26" | put a vector of strings in the stack | #rows, #columns, element sequence |
"27" | put a builtin reference in the stack | interface number, position in interface, function name |
"28" | continue command | none |
"29" | assignment | #lhs, display mode, (variable name, #rhs)* |
"30" | logical expression short circuit | type, jump size |
"31" | comment | the comment |
"99" | return command | none |
> "100" | builtin call (obsolete) | 100*fun, #rhs, #lhs, fin |
The fun2string function can be used to generate the intial code.
Examples
//DISPLAY function y=foo(x, flag) if flag then y=sin(x) else y=cos(x) end endfunction L=macr2lst(foo) fun2string(L)
See Also
- macrovar — variables of function
- fun2string — generates ascii definition of a scilab function
- macr2tree — conversion d'une fonction en arbre
- tree2code — generates ascii definition of a Scilab function
<< lasterror | Scilab | newfun >> |