On 2014-01-27 22:43, Serge Steer wrote:
--------------------
Le 27/01/2014 19:05, Stefan Du Rietz a écrit :
Hello Paul,
after trying like a maniac ;-) I finally managed to reproduce it!
The error shows up only when you run the command from the command
window after a pause in the attached function testlisterror.sci.
-->testlisterror("pnonfast","nonfast")
-1->args(1) = null()
args(1) = null()
!--error 44
Wrong argument #2.
Without the pause it works OK.
Regards
Stefan
Under pause, you cannot modify a variable which is defined in the
calling context
so in such a context args is not a list as you expect but an empty
array which is implicitely created
To make it work
you must do
-1-> args; //makes a local copy of args
-1->args(1) = null()
Serge
What do you mean by "defined in the calling context"?
I can modify this:
-1->isfast
isfast =
0. 0.
-1->isfast(1) = 1
isfast =
1. 0.
Stefan
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users