View previous topic :: View next topic |
Author |
Message |
X-Tools Valued Contributor
Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Mar 04, 2002 7:34 am Post subject: @ext Error ? |
|
|
Hi,
I'm trying to compare @ext values in two different scripts but in none of them it works:
%%param includes the filename:
%%dummy = @ext(%%param)
if @equal(%%dummy,ccx)
info yes it is ccx: see: @ext(%%param)
else
info no, sorry: @ext(%%param)
end
but always there comes the box: no, sorry: ccx
Where is the problem ?
Bye, Fabian |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Mar 04, 2002 9:59 am Post subject: |
|
|
Hmmm. Your code looks just fine. There should be no problem with it.
Could there be some invisible character in your filename extension?
Perhaps you could try to box in your output check to see whether
something else is hiding in the value returned from @EXT.
Perhaps try something like this:
Code: |
%%dummy = @ext(%%param)
if @equal(%%dummy,ccx)
info Yes it is ccx: see: #%%dummy#
else
info No sorry: #%%dummy#
end
|
Hope it helps a bit.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
X-Tools Valued Contributor
Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Mar 04, 2002 10:30 am Post subject: @ext Error ? |
|
|
Hi,
you are right - this is the problem.
the @ext function returns 12 characters (3 from the extension and 9 spaces). I trimmed the variable and now this works.
Is this a bug in vds ? Because I have this problem in multiple scripts.
Thanx again.
Bye, Fabian |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Mar 04, 2002 10:50 am Post subject: |
|
|
I don't think that it is a VDS bug because I haven't seen any reports on
this before - and I myself have lots of scripts using @EXT without any problems.
Perhaps you should rather check the way that you obtain the value for
your %%param variable. The problem more likely lies there.
But if this is somehow related to your OS or something, you should keep
us posted here because many would be interested in knowing about
potential problems in using the @EXT function.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
|