diff options
author | jofret | 2009-05-05 13:52:15 +0000 |
---|---|---|
committer | jofret | 2009-05-05 13:52:15 +0000 |
commit | 83c68889eff40411bbef50df0904f3585ed9e2b7 (patch) | |
tree | 16fb9d67c603e867e10f675a6e5fb8c3bb58b41f /macros/ASTManagement/%variable_string.sci | |
parent | b11350b841069ef8db155516a310eb7523c5e183 (diff) | |
download | scilab2c-83c68889eff40411bbef50df0904f3585ed9e2b7.tar.gz scilab2c-83c68889eff40411bbef50df0904f3585ed9e2b7.tar.bz2 scilab2c-83c68889eff40411bbef50df0904f3585ed9e2b7.zip |
Split into several files
Diffstat (limited to 'macros/ASTManagement/%variable_string.sci')
-rw-r--r-- | macros/ASTManagement/%variable_string.sci | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/macros/ASTManagement/%variable_string.sci b/macros/ASTManagement/%variable_string.sci new file mode 100644 index 00000000..cfb2e8ec --- /dev/null +++ b/macros/ASTManagement/%variable_string.sci @@ -0,0 +1,23 @@ +function txt=%variable_string(v) + global anscounter; //NUT: just to fix problem with ans variables. +//overloading function for "variable" type tlist string function +//fields: name +//this is a leaf of the AST +//NUT: changed here. For me %i is a number not a variable. + if (v.name == "%T" | ... + v.name == "%F"| ... + v.name == "%nan"| ... + v.name == "%inf"| ... + v.name == "%pi") + txt=['Number_x: '+v.name]; + elseif (v.name == "%i") + txt=['Number_X: '+v.name]; + else + if (v.name == 'ans') + anscounter = anscounter + 1; + txt=['Variable: '+v.name+string(anscounter)]; + else + txt=['Variable: '+v.name]; + end + end +endfunction
\ No newline at end of file |