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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Nov 22, 2008 6:09 am   

[2.37] Can't call function with a function
 
While working on a forum request I came across this oddity.

Code:
#noop %pop(%push("test",test))


I can't seem to call a function with a function. Everything works well as two separate calls. The inner function called is highlighted green which suggests it's not parsing properly. Of course I could be missing something obvious, but I didn't think this was a CMUD restriction.
_________________
Asati di tempari!
Reply with quote
Tarn
GURU


Joined: 10 Oct 2000
Posts: 875
Location: USA

PostPosted: Sat Nov 22, 2008 8:09 am   Re: [2.37] Can't call function with a function
 
Tech wrote:
While working on a forum request I came across this oddity.

Code:
#noop %pop(%push("test",test))


I can't seem to call a function with a function. Everything works well as two separate calls. The inner function called is highlighted green which suggests it's not parsing properly. Of course I could be missing something obvious, but I didn't think this was a CMUD restriction.


I'm not sure I understand what you're trying to do. %push takes the string to add and the contents of the list as arguments while %pop takes the name of a list as an argument, not the list itself represented as a pipe-delimited string. Since %push returns a new list, do you really have a variable named "test"|[whatever was already there] to pop the left item from? Does %push("test",test) make sense in the context of what you're doing?

-Tarn
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Nov 22, 2008 4:01 pm   
 
You know what... it was a brain lapse on my part. I need to be more focused and review when I post this. I tried some other examples of function within functions and they worked just fine.

Embarassed
_________________
Asati di tempari!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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