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


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Jul 11, 2005 2:30 pm   

a question of speed: reparse trigs
 
I'm curious as to which would be quicker, if either? For anyone not sure, you -can- use reparse trigger states in this manner. It seems reliable. I hope I got all the syntax correct, as I wrote this example straight from my head. If its a little wrong, please just try to assume I got it right?

Code:
#TR "IDname" {Pattern to begin} {}
#COND {*} {} {manual}
#COND {One of twenty or so messages} {varname=something} {reparse}
#COND {Another of twenty or so messages} {anothervarname=something} {reparse}
...
...
#COND {A pattern to end this} {anAlias;#STATE IDname 0} {reparse}

OR
Code:
#CLASS {classname}
#TR {pattern to begin} {#T+ classname2}
#CLASS {classname|classname2}
#TR {One of twenty or so messages} {varname=something}
#TR {Another of twenty or so messages} {anothervarname=something}
...
...
#TR {A pattern to end this.} {anAlias;#T- classname2}
#CLASS 0
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Mon Jul 11, 2005 5:16 pm   
 
I would go with the second one, looks tidier that way.
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