[scilab-Users] Question regarding execstr use

Celso Co celso.co at gmail.com
Fri Nov 5 13:36:38 CET 2010


Try

s="for i=1:5, printf(""Hello World %d\n"",i), end"
execstr(s)

Note the double quote "".

cco

On Fri, Nov 5, 2010 at 6:19 PM,  <paul.carrico at free.fr> wrote:
> All,
>
> Can somebody tell me why the use of execstr leads to an error (?!?!?) ... I had a look on the help documenttation but ????
>
> Thanks for any advice
>
> Paul
>
>
> // OK
> for i = 1 : 5
>    printf("Hello world %d\n",i)
> end
>
>
> // error
> h = 5;
>
> execstr("for i = 1 : " + string(h))
>    execstr("printf(''Hello world %d\n'',i)")
> execstr("end")
>
> Nota : of course execstr are not necessary in the 2 last lines ... last attempts !
>



-- 
Eng'r Celso B. Co, PhD ECE
Assistant Professor
Dept. of Electronics, Computer, and Communication Engineering,
Loyola Schools of Science and Engineering, Ateneo De Manila



More information about the users mailing list