rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* what if?, suggestion to re-instate the alternative if not syntax...
@ 1999-12-08 15:13 Bengt Kleberg
  1999-12-09  8:00 ` Decklin Foster
  0 siblings, 1 reply; 6+ messages in thread
From: Bengt Kleberg @ 1999-12-08 15:13 UTC (permalink / raw)
  To: rc

Would it be possible to re-instate if not, ie the weird way of writing } else {
that was  around in rc in the very beginning? (and still is in Plan9 rc).

I ahve a very rare wish to run Plan9 rc scripts using Byrons rc. this is seldom,
but if it is possible/not difficult or so, I would like suggest it.

any comments?


Best Wishes, Bengt
===============================================================
Everything aforementioned should be regarded as totally private
opinions, and nothing else. bengt@softwell.se
``His great strength is that he is uncompromising. It would make
him physically ill to think of programming in C++.''


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: what if?, suggestion to re-instate the alternative if not syntax...
@ 1999-12-09  8:13 Byron Rakitzis
  0 siblings, 0 replies; 6+ messages in thread
From: Byron Rakitzis @ 1999-12-09  8:13 UTC (permalink / raw)
  To: bengt, rc

>I ahve a very rare wish to run Plan9 rc scripts using Byrons rc.

Without looking at the source, you'd have to change two things: the
yacc file (and the lexer), and any "undumping" code to emit function
definitions for export. The change should be trivial in both cases.

The question I have is why you'd want to do this!? Are there any useful
"standalone" rc scripts which are portable between plan9 and unix?


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: what if?, suggestion to re-instate the alternative if not syntax...
@ 1999-12-10  9:00 Bengt Kleberg
  0 siblings, 0 replies; 6+ messages in thread
From: Bengt Kleberg @ 1999-12-10  9:00 UTC (permalink / raw)
  To: fosterd, rc

> > if not, ie the weird way of writing } else { that was  around in rc in the very beginning

> I'm curious, what is this syntax?

1 man page bug alert. the paper describing rc for plan9 is mentioned as included in the unix rc
distro. it is not. (or I can not find it)

2 the paper can be found at http://plan9.bell-labs.com/plan9/doc/rc.html

3 the old syntax was

if (test -f afile) {
echo file exists
}
if not {
echo file does not exist
}



^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: what if?, suggestion to re-instate the alternative if not syntax...
@ 1999-12-10  9:06 Bengt Kleberg
  0 siblings, 0 replies; 6+ messages in thread
From: Bengt Kleberg @ 1999-12-10  9:06 UTC (permalink / raw)
  To: bengt, byron, rc

> Are there any useful "standalone" rc scripts which are portable between plan9 and unix?

Given the plan9 source, and a large set of patches (boddles), it woud be nice to update the
source and burn a new CD-ROM. For various reasons I would prefer to burn the CD from Unix,
and also load the source, do the patch on Unix. The boddles are rc scripts, which use if not.

Note: I would not want to remove } else { . If not would only be a complement.

Best Wishes, Bengt
===============================================================
Everything aforementioned should be regarded as totally private
opinions, and nothing else. bengt@softwell.se
``His great strength is that he is uncompromising. It would make
him physically ill to think of programming in C++.''


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-12-10 10:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-08 15:13 what if?, suggestion to re-instate the alternative if not syntax Bengt Kleberg
1999-12-09  8:00 ` Decklin Foster
1999-12-09  8:22   ` Markus Friedl
1999-12-09  8:13 Byron Rakitzis
1999-12-10  9:00 Bengt Kleberg
1999-12-10  9:06 Bengt Kleberg

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).