* [9fans] [p9p] rc script fails silently in conditional expression calling a function
@ 2013-08-06 13:16 dexen deVries
2013-08-06 13:46 ` erik quanstrom
0 siblings, 1 reply; 2+ messages in thread
From: dexen deVries @ 2013-08-06 13:16 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-06 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 13:16 [9fans] [p9p] rc script fails silently in conditional expression calling a function dexen deVries
2013-08-06 13:46 ` erik quanstrom
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).