summaryrefslogtreecommitdiff
path: root/2.3-1/macros/ASTManagement/%program_string.sci
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/macros/ASTManagement/%program_string.sci')
-rw-r--r--2.3-1/macros/ASTManagement/%program_string.sci19
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