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
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Sat Jul 10, 2004 8:34 pm   

The issue with %regex
 
There is a really large issue with %regex. It doesn't evaluate its arguments properly:

regexp="test"
#show %regex( "test", @regexp)
-> 0

The regexp argument doesn't seem to get evaluated. If this is true and I haven't done anything wrong it shows that each argument list is handled different by each command.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jul 11, 2004 2:35 am   
 
Actually they all are different. You really have to check with the Command/Function Wizard to see what the type setting for the argument is. Strings are subject to expansion, expressions get both expansion and evaluation, literal is taken exactly as is. The argument in question is type "pattern" as this type was recently added I don't think Zugg ever said one way or another. I guess it is synonymous with literal.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Sun Jul 11, 2004 10:22 am   
 
quote:
Originally posted by Vijilante

Actually they all are different. You really have to check with the Command/Function Wizard to see what the type setting for the argument is. Strings are subject to expansion, expressions get both expansion and evaluation, literal is taken exactly as is. The argument in question is type "pattern" as this type was recently added I don't think Zugg ever said one way or another. I guess it is synonymous with literal.


Auch that is really a mess. The reason I think it is a mess is that it confuses the users and makes zScript much tougher to use, and learn.

"var = %pop(listName)" also seems to be an example of where the argument is taken as a literal. However the documentation does not say that this is in fact a literal. All it says is that listName is not the @listName reference.

What if you have a variable containing the name of the stack to pop from and want to do something like %pop(@getName)? That would be very tough to do with how zScript seems to handle argument expansion.
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