calling function in msg
Mike Yates
myates at sumitsoftware.com
Tue Apr 2 09:38:01 EST 2002
Jim Hurley <jphurley at jps.net> wrote
>There remain problems in calling functions from the msg box. It is
>true that you can avoid problems with a *simple* function call by
>avoiding "put", but there are problems with compound statements.
>
>For example: In the stack script defined the function
>
>function sq x
>return x*x
>end sq
>
>If you enter into the msg box sq(3) you get 9 as expected. But if you
>enter 3*sq(3) you get an error.
On the other hand if you enter sq(3)*3 you get 27. It's the lack of
symmetry that is the problem - also it doesn't just apply to defined
functions but native functions as well - try 3*sin(3) and sin(3)*3.
Mike Yates <myates at sumitsoftware.com>
More information about the metacard
mailing list