On 9/8/2012 09:34, tj wrote:
On 9/8/2012 09:04, Hemant Kumar wrote:
Hello,
On 08-Sep-2012, at 5:10 PM, tj <t...@apache.org> 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 "!=".
/tj/
Please excuse slightly fuzzy thinking, here. Subsequent NEQ statements
are straight IF, not ELSEIF. --/tj/
---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscr...@incubator.apache.org
For additional commands, e-mail: ooo-users-h...@incubator.apache.org