Article View: news.software.readers
Article #35274Re: [SLRN] Help w/macro please
From: Olly Betts
Date: Fri, 18 Jul 1997 00:00
Date: Fri, 18 Jul 1997 00:00
34 lines
1715 bytes
1715 bytes
In article <slrn5spep7.26.pardoz@io.com>, Pardoz wrote:
>On 16 Jul 97 02:11:20 GMT, J.B. Nicholson-Owens
><jbn@pop-a-wheelie.midwest.net> wrote:
>>1. I don't think you want to use double parentheses. Out of curiosity, what
>> programming language uses double parentheses in the way you're using them
>> here?
>
> S-Lang apparently - at least it stopped giving me syntax errors
>when I switched from a single to a double parenthesis.
Double brackets are a way of telling slang you really wanted to use an
assignment in an if statement (a similar construct works for suppressing a
similar warning with some C compilers).
In this case, you clearly don't want to assign, you want to test equality,
so you should be writing something like:
!if (strcmp(rsp,"Lynx")) browservbl = "lynx2.cmd %s";
Not:
if ((rsp = "Lynx")) browservbl = "lynx2.cmd %s";
which is roughly equivalent to:
rsp = "Lynx";
if (rsp) browservbl = "lynx2.cmd %s";
Olly
--
Don't send a man to do a buoy's job.
Technical Details
Message-ID:
<slrn5suj79.62d.olly@noxious.muscat.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn5sn34c.8o.pardoz@io.com> <slrn5sobak.36l.jbn@pop-a-wheelie.midwest.net> <slrn5spep7.26.pardoz@io.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn5suj79.62d.olly@noxious.muscat.co.uk> Subject: Re: [SLRN] Help w/macro please Date: Fri, 18 Jul 1997 00:00:00 +0000 From: olly@muscat.co.uk (Olly Betts) References: <slrn5sn34c.8o.pardoz@io.com> <slrn5sobak.36l.jbn@pop-a-wheelie.midwest.net> <slrn5spep7.26.pardoz@io.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 257539054 Mail-Copies-To: always Organization: Muscat Ltd -- http://www.muscat.co.uk/ Newsgroups: news.software.readers