9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Non-parallel loop in Sam
@ 2008-02-06 16:57 Hongzheng Wang
  2008-02-07  9:55 ` Douglas A. Gwyn
  0 siblings, 1 reply; 7+ messages in thread
From: Hongzheng Wang @ 2008-02-06 16:57 UTC (permalink / raw)
  To: 9fans

Hi all,

I'm new to Plan9 and also this mailing list.

After some experience with Sam's structral regexp, I become quite
interested in this editor command.  And I also noticed that the loop
and condition commands of Sam, say x, y, g, v etc, are somewhat
different from the commands of ed.  For example, all changes in a x
command execution occure simultaneously, rather than the model used by
ed where each change would  be made at once even in a g command
execution.  As a result, some tips in ed, such as ',g/^/m0' to invert
all lines of a file, would be invalid.  My question is, how to
impliment non-parallel loop/condition commands in Sam?  In another
word, how to do things, such as inverse all lines, in Sam?

Thanks.

--
HZ


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

end of thread, other threads:[~2008-02-07 12:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-06 16:57 [9fans] Non-parallel loop in Sam Hongzheng Wang
2008-02-07  9:55 ` Douglas A. Gwyn
2008-02-07 11:33   ` Hongzheng Wang
2008-02-07 11:38     ` sqweek
2008-02-07 11:42     ` y i y u s
2008-02-07 11:43   ` Rob Pike
2008-02-07 12:37     ` Hongzheng Wang

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