9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] rcmain
@ 2005-12-09 21:02 erik quanstrom
  2005-12-09 21:34 ` Russ Cox
  0 siblings, 1 reply; 3+ messages in thread
From: erik quanstrom @ 2005-12-09 21:02 UTC (permalink / raw)
  To: 9fans

rcmain has an interesting construct. it goes something like

	if (~ $#'fn#cd' 1)
		cmd;

i was a little curious about this so i tried this

	fn fu {echo bar}
	if (~ $#'fn#fu' 1)
		echo yes;
	if not
		echo no;

which outputs "no". however this 

	fn fu {echo bar}
	rc
	if (~ $#'fn#fu' 1)
		echo yes;
	if not
		echo no;

outputs "yes". 


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

end of thread, other threads:[~2005-12-09 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-09 21:02 [9fans] rcmain erik quanstrom
2005-12-09 21:34 ` Russ Cox
2005-12-09 21: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).