[scilab-Users] Question regarding execstr use

Allan CORNET allan.cornet at scilab.org
Fri Nov 5 11:33:13 CET 2010


Hi,

h = 5;
execstr("for i = 1 : " + string(h) + ",  printf(''Hello world %d\n'',i), end")

Allan


-----Message d'origine-----
De : paul.carrico at free.fr [mailto:paul.carrico at free.fr] 
Envoyé : vendredi 5 novembre 2010 11:20
À : users at lists.scilab.org
Objet : [scilab-Users] Question regarding execstr use

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 !  




More information about the users mailing list