Article View: news.software.readers
Article #233374Re: Slrn
From: John E. Davis
Date: Fri, 22 May 2009 17:47
Date: Fri, 22 May 2009 17:47
24 lines
1751 bytes
1751 bytes
On Fri, 22 May 2009 15:52:21 +0200, Christian Ebert <blacktrash@gmx.net>
wrote:
> % display article if it was shown before:
> if (isvisible == 3 and show_article == 0 ||
> isvisible != 3 and show_article != 0)
> call ("hide_article");
[...]
> If you S-Lang version is < 2.1 iirc you'd have to replace the ||
> operators with an orelse construct. Anyway, try it out.
In this case, short-circuiting operators are not needed. So, it can
be coded using `or' in place of `||'. Note that `||' and `&&'
short-circuit, whereas `or' and `and' do not. The old `orelse' and
`andelse' constructs are obsolete and should not be used.
FWIW, the test can also be written as:
#v+
if ((isvisible==3) xor show_article)
call ("hide_article");
#v-
Thanks,
--John
Technical Details
Message-ID:
<slrnh1dpa0.l3l.jed@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mailReferences:
<slrnh1d5up.1ho.r.trev@ccla-05.fastwebit.ofc> <20090522130856.698.slrn@krille.blacktrash.org>Show Full Headers
Complete Article Headers
Message-ID: <slrnh1dpa0.l3l.jed@aluche.mit.edu> Subject: Re: Slrn Date: Fri, 22 May 2009 17:47:44 +0000 From: "John E. Davis" <jed@jedsoft.org> References: <slrnh1d5up.1ho.r.trev@ccla-05.fastwebit.ofc> <20090522130856.698.slrn@krille.blacktrash.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail Newsgroups: news.software.readers User-Agent: slrn/pre1.0.0-11 (Linux) Lines: 24 NNTP-Posting-Host: ALUCHE.MIT.EDU X-Trace: 1243014464 senator-bedfellow.mit.edu 512 18.75.2.45