function %onprompt works only when defined at pause level 0
Reported by Enrico SEGRE
-- Bug description --
function %onprompt works only when defined at pause level 0
-- Scilab error message --
-- How to reproduce the bug --
___________________________________________
scilab-SE-BUILD_4-16530
Copyright (c) 1989-2007
Consortium Scilab (INRIA, ENPC)
___________________________________________
Startup execution:
loading initial environment
--> [Ctrl-c]
-1->function %onprompt; printf("boo"); endfunction
-1->2+2
ans =
4.
-1->// nothing
-1->resume
-->1+1
ans =
2.
viceversa:
-->function %onprompt; printf("zum"); endfunction
-->3+3
zum ans =
6.
--> [Ctrl-c]
-1->4+4 //are here within %onprompt or not?
ans =
8.
-1->whereami() // apparently so...
whereami called under pause
pause called at line 1 of macro %onprompt
-1->resume //note that "zum" is printed here
zum
-->