evstr(["7" "[]" "%pi"]): void results shift output components + Unconsistent behaviors
Reported by Samuel GOUGEON (@sgougeon)
evstr("")
evstr("[]")
// are supported, but in
evstr(["%pi" "[]" "%eps"])
"[]" shifts output components by 1 place
-->a = evstr(["%pi" "[]" "%eps"])
a =
3.1415927 2.220D-16
-->a(2)
ans =
2.220D-16
In the other hand,
evstr("plot2d()")
runs well the graphics but finally yields an error because plot2d()'s output is void:
-->evstr("plot2d()")
!--error 10000
evstr: Given expression has no value.
at line 76 of function evstr called by :
evstr("plot2d()")
The behavior of evstr() with respect to void results is not consistent.
Proposal:
a) when the input is a scalar and the output is void (as with "[]" and "plot2d()"), evstr() should run smoothly and return []
b) when the input is not a scalar string and there is at least one void result, evstr() should display an error.