 |
jat63 Wanderer
Joined: 22 Sep 2003 Posts: 53 Location: United Kingdom
|
Posted: Tue Sep 07, 2004 6:37 pm
Functions and #eval |
Please could someone help. I am sure I must be doing something stupid but so far have failed to spot what it is. I have tried to reproduce the exable from the 7.05 help file on functions:
---------
#FU fact {%if(%1<=1,1,%1*@fact(%eval(%1-1)))}
#EVAL @fact(5)
will display 120 given the above definition
#SHOW @fact(5)
will display 5*4*3*2*1 given the above definition
----------
However, when I run the examples both the #SHOW and #EVAL return:
5*4*3*2*1
The #EVAL does not seem to be evaluating the string to return 120. Any ideas why I am unable to reproduce the example? |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Sep 07, 2004 6:53 pm |
#EVAL obviously doesn't fully evaluate the function. It's a bug. Report it if it's not already on the bug list.
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
jat63 Wanderer
Joined: 22 Sep 2003 Posts: 53 Location: United Kingdom
|
Posted: Tue Sep 07, 2004 7:04 pm |
Thanks - have entered a bug report
|
|
|
|
 |
|
|
|