incubator-ooo-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tj>
Subject Re: Display text if condition is true
Date Sat, 08 Sep 2012 13:34:14 GMT
On 9/8/2012 09:04, Hemant Kumar wrote:
> Hello,
> On 08-Sep-2012, at 5:10 PM, tj <> wrote:
>> This should not be particularly difficult, using the "not-equal" logical operator:
if editor NE "emacs" "Saint Ignatious", etc.
>> (Caveat: I haven't used this feature either.) IMHO, the original design decision
was, ah, unfortunate.
> mmm, I could be wrong but the only way I can make this work seems like:
> # print "Saint Ignatious" if editor is emacs
> if editor EQ "vim" or editor EQ "nano" or editor EQ "gedit"
>    "Saint Ignatious"
> if editor EQ "emacs" or editor EQ "nano" or editor EQ "gedit"
>    "Vim Ahoy"
> ....
> ....
> Which seems like a brain twister. :-)
> Also, above approach is not scalable to things like GTE and stuff.
The "not-equal" operator is a bit of a brain twister, too. Expanded,
if editor NEQ "emacs" [then hide the following text:] "Saint Ignatious"
elseif etc. NEQ etc.
You are quite right about the "EQ" approach not scaling well, but the 
"NEQ" method should scale nicely. In your extension, you need to 
/generate/ "NEQ", but if you want the user to enter "EQ" instead, you 
can do that.
BTW, the syntax shown in Help is "NEQ", or the more usual "!=".


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message