Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
jat63
Wanderer


Joined: 22 Sep 2003
Posts: 53
Location: United Kingdom

PostPosted: 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?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
jat63
Wanderer


Joined: 22 Sep 2003
Posts: 53
Location: United Kingdom

PostPosted: Tue Sep 07, 2004 7:04 pm   
 
Thanks - have entered a bug report
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net