Subject: A simple question about the 'FUNCTION format.
From: Mathieu Avila
Date: Tue, 25 Mar 2003 17:40:49 +0100
Hello,
I have a simple question about the ' around functions. I would like to
write a simple function (let's call it FUNC), which in case it couldn't
be evaluated because its arguments depend on unknown variables, should
return 'func(...). This is just the same behaviour as MAX(a,b) for example.
But when i try to SUM and EV it, i get an infinite evaluation leading to
a stack overflow. There is a different behaviour with MAX.
(C1) ev(sum(max(a,b),a,1,2),max);
(D1) MAX(B, 2) + MAX(B, 1)
(C2) func(a,b) := block([],return('func(a,b)));
(D2) FUNC(A, B) := BLOCK([], RETURN('FUNC(A, B)))
(C3) ev(sum(func(a,b),a,1,2),func);
Error: Bind stack overflow.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by MEVAL1.
Broken at MEVAL1. Type :H for Help.
How can i define a user function who has the same behaviour as MAX ?
What is the exact meaning of "'" ? i haven't found an exact definition
in the manual.
Thank you in advance for your advice.
--
Mathieu Avila
mavila@irisa.fr