• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

I don't know which way this should be fixed, but there is a mismatch:

data/TWiki/IfStatement.txt, line 31:

| <nop>=, !<nop>= | String comparison |

=lib/TWiki/If.pm, lines 126-134

$defOps{'!='} =
  { name => '!=',
    prec => 4,
    type => 1,
    exec => sub {
        my( $twiki, $a, $b ) = @_;
        return $a->evaluate($twiki) != $b->evaluate($twiki);
    }
   };

For string comparison, the third line from the bottom must read

        return $a->evaluate($twiki) ne $b->evaluate($twiki);

Workaround is to just say not(string1 = string2) instead instead of string1 != string2 if string comparison is needed.


Thanks Harald, it was meant to be string comp. SVN 6953 CC

ItemTemplate
Summary %IF docs say != is string, but implementation in If.pm treats as numeric
ReportedBy TWiki:Main.HaraldJoerg
AppliesTo Engine
Priority Low
CurrentState Closed
WaitingFor

Checkins 6953
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-10-10 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback