 |
ragbash Newbie
Joined: 08 Mar 2008 Posts: 3
|
Posted: Sun Mar 16, 2008 3:00 pm
Pattern Matching / Alias |
I'm confused..
I am trying to script intuitive ftp functions for zmud, but I can't seem to get parameter checks working right.
For instance:
#if (%ends( %1, ".c") or %ends( ".h", %1)) returns true if there are no arguments passed to the alias, so I try this:
#if (%1 and (%ends( %1, ".c") or %ends( ".h", %1)))
which seems to do the same..
Any suggestions on better parameter checking?
Thanks,
-Olorin
Dune Mud |
|
|
|
 |
Dharkael Enchanter

Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Sun Mar 16, 2008 4:54 pm |
| Code: |
| #if (%numparam and (%ends( %1, ".c") or %ends( %1,".h"))) {vrai} {faux} |
On second look your original was on the right track, you just switched the arguments of the second %ends
change
#if (%ends( %1, ".c") or %ends( ".h", %1))
to
#if (%ends( %1, ".c") or %ends( %1, ".h")) |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
 |
|
|
|
|
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
|
|