Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Functions

0 views
Skip to first unread message

David K

unread,
Nov 21, 2009, 1:28:50 AM11/21/09
to
Hi,

can someone tell me why the following script at the Scilab promt stops the
echoing of subsequent commands and their results to the screen ?

**
function y=foo(x,g) ; y=g(x) ; endfunction
**

When I type the following there is no response, only a blank command prompt
instead of 'ans ='

**
typeof(foo)
**


thanks and regards

David


Rainer von Seggern

unread,
Nov 21, 2009, 11:04:43 AM11/21/09
to

Hi David.
I'm only able to reproduce your error with a wrong "endfunction", that
means the function definition is not finished.
Try the following example:

function y=foo(x,g);y=g(x);enfunction
-->1+5
--> //any other scilab commands
-->endfunction // at this point the function definition is finished,
and you see the normal prompt.

I hope this helps,
Rainer

David K

unread,
Nov 21, 2009, 7:26:02 PM11/21/09
to
Yeap,

that did it ! It was the spaces between the ; that were the problem,

thanks Rainer,

regards

David

"Rainer von Seggern" <r.von....@lycos.de> wrote in message
news:f18365ea-77a9-46c6...@x31g2000yqx.googlegroups.com...

0 new messages