calling function in msg
Jim Hurley
jphurley at jps.net
Sat Mar 30 16:11:01 EST 2002
>
>Scott Rossi wrote:
>>
>> > MetaCard won't evaluate any custom functions from the message box, only
>> > the built-in functions. It took me a while to figure that out too.
>>
>> Actually, it can. Entering the name of the function in the message box will
>> return any values within the message box itself; don't use "put" or
>> "answer".
>
>Wow. Is this a change? In older versions of MC I always got an error, so
>I quit trying long ago. Calling a custom function from the message box
>for testing purposes was one of the things I missed the most from my HC
>days -- this is good news. Thanks!
>
>--
>Jacqueline Landman Gay | jacque at hyperactivesw.com
>HyperActive Software | http://www.hyperactivesw.com
>
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.
This is a serious problem using MC/Rev in education. I would like
students to be able to use the msg box for such simple tasks.
--
Jim Hurley
More information about the metacard
mailing list