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
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Sun Jul 27, 2008 1:21 am   

#call vs #noop with functions
 
A fair bit of my scripting uses #noop instead of #call for functions.

I was wondering whether this matters? I wrote it that way originally, not knowing about #call. If its bad, I'll just have to go through and change it, but if it doesn't matter then I won't bother.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sun Jul 27, 2008 4:03 am   
 
It does matter (as I discovered for myself), you'll need to go through and change it.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jul 27, 2008 3:35 pm   
 
The difference as far as I know is that #NOOP examines its parameters at runtime, whereas #CALL is examined at compile time. This lets #CALL go a bit faster. COM references also have special threading requirements, and because of this #NOOP is always run in that special mode, whereas #CALL is evaluated to determine if that mode is required. Once again it makes #CALL a small bit faster.

Basically anyplace you have #NOOP should be #CALL. I don't actually know of script that requires #NOOP instead.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Jul 30, 2008 2:17 pm   
 
#NOOP no longer works for function calls AFAIK, or at least on some function calls. #NOOP used to be more efficient in zMUD (or at least appeared to be from the description).
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