Page 1 of 1

What's Quicker?

Posted: Wed Apr 21, 2004 5:22 pm
by devNull
/declare x local
/varset x @Param1

A) /if ( @x==SomeString )

B) /if ( ${String[@x]==SomeString} )

C) /if ( ${String[@x].Equal[SomeString] )

I guess I'm wondering if I should change my old style compares (A) to semi object-based (B) or full object-based (C).

Will == be obsoleted when the new variable method is implemented?

Posted: Wed Apr 21, 2004 5:35 pm
by dont_know_at_all
You might want to test them yourself. I think you'll find the answer is pretty clear.

Posted: Wed Apr 21, 2004 7:20 pm
by Diggler
What my buddy(?) DKAA here is trying to say is, /if only supports numerical comparisons now, so you won't have much luck with A or B ;)

Posted: Wed Apr 21, 2004 8:14 pm
by devNull
LOL, so true. But it was working with the files from an earlier ZIP (4/14 I think) and today's offsets (from the offsets thread) when I asked the question. :D

Oh well, moot question now.

Posted: Wed Apr 21, 2004 8:58 pm
by Lax
A would give a parsing error
B would end up /if ( NULL ) 100% of the time (which would execute "false")