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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
cypren
Wanderer


Joined: 03 Nov 2000
Posts: 59

PostPosted: Sat Feb 10, 2007 1:42 pm   

[1.24] Nested %exec functions do not return output
 
If a user-defined function which operates off of an %exec() calls a sub-function which also uses %exec(), the final results are returned and executed as commands rather than simply returned as a string list.

Example:

Code:
#FUNCTION foo %exec("#LOOP 1,14 { @fwiz(50,%i) }")
#FUNCTION fwiz %mod(%1,%2)
#ECHO @foo

This will echo:
Code:
0|0|2|2|0|2|1|2|5|0|6|2|11|8

Now enter:
Code:
#FUNCTION fwiz %exec("%mod(%1,%2)")
#ECHO @foo

And you will get, sent to the MUD as typed commands:
Code:
0
0
2
2
0
2
1
2
5
0
6
2
11
8

This behavior is the same in zMUD, but the documentation for both products mentions nothing about nested %exec() statements being a problem.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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