Ilya Zakharevich on Wed, 10 Nov 1999 21:53:20 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Turning a sequence of expr into expr


I got an impression that functions which take a chunk of code as an
argument always take a statement, though the parser gives them a
sequence of statements.  Otherwise I cannot explain what happens here:

 \p 9
 ploth(t=100,110,z=zeta(0.5+I*t);[real(z),imag(z)])
 ***   impossible assignment t_COMPLEX --> t_REAL.

As you see, the execution started (so the skipwhatever() was expecting
a sequence), but apparently the second statement is ignored.

If we suppose that this is not a bug in ploth(), then how to wrap
these statements into one?  I hate to use 

  ploth(t=100,110,[real(z=zeta(0.5+I*t)),imag(z)]) 

and defining a function is a performance hit.

Ilya