Argument order & the @ wildcard

Kirk Brooks (4/1/14 12:37PM)

Kirk Brooks (4/1/14 12:37 PM)


I am a little surprised I never encountered this issue before (or that I
have and haven't identified it yet) but I just noticed the order of
arguments matters when using the wildcard.

I was comparing a string to an argument with a wildcard:

dts : 20140401@
dts2: 20140401122158

dts ?=3D dts2 : False
dts >= dts2 : False

dts2 ?=3D dts : True
dts2 <<= dts : True

It makes sense once I thought about it - dts is not the same string as
dts2. This explains the first case.

The second case compares the longer string to the wildcard string so it
'could' be equal.

I wonder if this is a stricter interpretation than prior versions? I'm
complaining I just think I would have bumped into this before as my
before today was that both cases would have evaluated the same.

In case some one wants to copy and paste my example:

$dts:=String(Year of(Current date(*)))+String(Month of(Current
date(*));"00")+String(Day of(Current date(*));"00")+"@...


$text:="dts : "+$dts+"\rdts2: "+$dts2
$text:=$text+"\r\rdts ?=3D dts2 : "+String($dts=$dts2)
$text:=$text+"\rdts >= dts2 : "+String($dts>=$dts2)

$text:=$text+"\r\rdts2 ?=3D dts : "+String($dts2 =$dts)
$text:=$text+"\rdts2 <<= dts : "+String($dts2<<=$dts)

Kirk Brooks
San Francisco, CA

Reply to this message

Summary created 4/1/14 at 9:55PM by Intellex Corporation

Comments welcome at: