Another beginner question

Sébastien Bihorel pomchip at free.fr
Thu Nov 12 04:28:23 CET 2009


Hi,

While translating some Matlab to Scilab, I stumbled upon some issues with
problems with the eval function. I don't quite get why the 'eval 6'
statement of the following code returns an error (and not the 'eval 3'
statement), and would appreciate any explanation.

Thank you

Sebastien


function [b]=test(z)
  b = 1;
endfunction

function [x,y]=test2(z)
  x = 1;
  y = 2;
endfunction

b=test(2)                // eval 1
b=evstr('test(2)')       // eval 2
b=eval('test(2)')        // eval 3

[x,y]=test2(2)           // eval 4
[x,y]=evstr('test2(2)')  // eval 5
[x,y]=eval('test2(2)')   // eval 6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20091111/9a937cee/attachment.htm>


More information about the users mailing list