|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: 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. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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.
|
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: 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. |
|
|
|
|
|