I've noticed comma has special treatment in other places too. For a long time I was using:
answer "this is a string" & comma & "this is another string"
Then I stumbled across doing it this way, which has the same result:
answer "this is a string","this is another string"
Odd if statement
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Odd if statement
Pete-
I'm sure I've come across places where the shortened comma syntax doesn't always work, but I can't think of them right now.
Anyway, as Mark correctly points out, math evaluation precedes equivalence evaluation, so as long as the values aren't quoted they'll be evaluated before testing to see if the results are equal.
I'm sure I've come across places where the shortened comma syntax doesn't always work, but I can't think of them right now.
Anyway, as Mark correctly points out, math evaluation precedes equivalence evaluation, so as long as the values aren't quoted they'll be evaluated before testing to see if the results are equal.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Odd if statement
Hi Mark,
Yep, the "naked comma" only seems to work in certain places for sure. I thought at one time that perhaps it had something to do with comma being the item delimiter, but I tried changing the itemdelim to something other than comma then using that character in an expression and got a compile error.
Yep, the "naked comma" only seems to work in certain places for sure. I thought at one time that perhaps it had something to do with comma being the item delimiter, but I tried changing the itemdelim to something other than comma then using that character in an expression and got a compile error.