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 - Русский - 日本語
Scilab Help >> Advanced functions > tree2code

tree2code

generates ASCII definition of a Scilab function

Syntax

txt = tree2code(tree, prettyprint)

Arguments

tree

a macro tree (coming from macr2tree).

prettyprint

an optional boolean value:

%T

generated code is indented and beautified

%F

generated code is not beautified (default)

txt

a column vector of strings, the text giving the Scilab instructions.

Description

Given a loaded Scilab function "tree" (returned by macr2tree), tree2code allows to re-generate the code.

Examples

tree=macr2tree(cosh);
txt=tree2code(tree,%T);
write(%io(2),txt,'(a)');

See Also

Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:54 CEST 2016