From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] [p9p] rc script fails silently in conditional expression calling a function
Date: Tue, 6 Aug 2013 15:16:36 +0200 [thread overview]
Message-ID: <2181530.vIh4zXDObE@coil> (raw)
on Plan 9 Port, the following Rc script fails silently, upon calling the `foo'
function in ``if (foo)''. i expected it to output `FAIL' instead. is that by
design, or is it some sort of a bug?
#!/usr/bin/env rc
flag e +
fn foo {
/bin/false
}
if (foo)
echo SUCCESS
if not
echo FAIL
for contrast, the following script outputs `FAIL' as expected -- the
difference being in calling the /bin/false directly in ``if(/bin/false)''
#!/usr/bin/env rc
flag e +
if (/bin/false)
echo SUCCESS
if not
echo FAIL
--
dexen deVries
[[[↓][→]]]
Take care of the luxuries and the necessities will take care of themselves.
-- L. Long
next reply other threads:[~2013-08-06 13:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 13:16 dexen deVries [this message]
2013-08-06 13:46 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2181530.vIh4zXDObE@coil \
--to=dexen.devries@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).