diff options
author | Ankit Raj | 2017-06-21 10:26:59 +0530 |
---|---|---|
committer | Ankit Raj | 2017-06-21 10:26:59 +0530 |
commit | a555820564d9f2e95ca8c97871339d3a5a2081c3 (patch) | |
tree | adb074b66a8e6750209880e6932305ce0a94c8bf /2.3-1/macros/ASTManagement/%program_string.sci | |
download | Scilab2C-a555820564d9f2e95ca8c97871339d3a5a2081c3.tar.gz Scilab2C-a555820564d9f2e95ca8c97871339d3a5a2081c3.tar.bz2 Scilab2C-a555820564d9f2e95ca8c97871339d3a5a2081c3.zip |
Updated Scilab2C
Diffstat (limited to '2.3-1/macros/ASTManagement/%program_string.sci')
-rw-r--r-- | 2.3-1/macros/ASTManagement/%program_string.sci | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/2.3-1/macros/ASTManagement/%program_string.sci b/2.3-1/macros/ASTManagement/%program_string.sci new file mode 100644 index 00000000..93486992 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%program_string.sci @@ -0,0 +1,19 @@ +function txt=%program_string(p) +//overloading function for "program" type tlist string function +//main (root) node of the Abstract Formal Tree +//fields: +// name : string (the function name) +// outputs : list of "variable" type tlist (the output arg names) +// inputs : list of "variable" type tlist (the intput arg names) +// statements: list of "equal" type tlist and list('EOL') (the +// instructions list) +// nblines : number (the number of lines in the scilab function) + txt=['Program' + 'Name : '+p.name + 'Outputs: '+strcat(objectlist2string(p.outputs),' ') + 'Inputs : '+strcat(objectlist2string(p.inputs),' ') + 'Statements ' + ' '+objectlist2string(p.statements) + 'EndProgram' + ] +endfunction |