Named Blocks (Was Re: Oh noooooo!!)
    Randal Schwartz 
    merlyn at iwarp.intel.com
       
    Sat Sep  9 14:06:33 AEST 1989
    
    
  
In article <475 at thirdi.UUCP>, peter at thirdi (Peter Rowell) writes:
| One thing I would have loved to have seen introduced by ANSI would have
| been "named blocks", but I am sure that parsing them is a bitch.
| Borrowing heavily from SAIL, a named block could be defined as one that
| has a string constant immediately following the opening curly brace.
Perl has 'em.
LINE: while ($_ = <stdin>) { # read a line into variable $_
	...;
	while ($something_needs_to_be_done) {
		...;
		...;
		next LINE if time > $quitting_time;
		# jump out to the outer loop
		...;
	}
	...;
}
Works pretty well.
Just another Perl hacker,
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel, Hillsboro, Oregon, USA                           |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/
    
    
More information about the Comp.lang.c
mailing list