Index: src/Tests/Makefile
===================================================================
--- src/Tests/Makefile	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/Tests/Makefile	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -8,5 +8,5 @@
 OUTPUTS = ${addprefix ${OUTPUTDIR}/,${EXAMPLES:.c=.txt}}
 
-.SILENT :
+#.SILENT :
 
 all :
@@ -19,5 +19,5 @@
 
 ${OUTPUTDIR}/%.txt : %.c ${CFA} Makefile
-	-${CFA} -n ${CFAOPT} < $< > $@ 2>&1
+	-${CFA} -n ${CFAOPT} $< > $@ 2>&1
 
 ${OUTPUTDIR}/report : ${OUTPUTS} ${EXPECTDIR}
Index: src/examples/abs.c
===================================================================
--- src/examples/abs.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/abs.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 18:26:16 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  3 11:14:58 2016
-// Update Count     : 43
+// Last Modified On : Wed Feb 17 09:32:04 2016
+// Update Count     : 44
 //
 
@@ -18,6 +18,4 @@
 
 int main( void ) {
-	ofstream *sout = ofstream_stdout();
-
 	char ch = -65;
 	sout | "char\t\t\t"					| ch     | "\tabs " | abs( ch ) | endl;
Index: src/examples/alloc.c
===================================================================
--- src/examples/alloc.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/alloc.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -11,6 +11,6 @@
 // Created On       : Wed Feb  3 07:56:22 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  3 16:32:04 2016
-// Update Count     : 38
+// Last Modified On : Wed Feb 17 11:43:23 2016
+// Update Count     : 40
 // 
 
@@ -27,6 +27,4 @@
 
 int main( void ) {
-    ofstream * sout = ofstream_stdout();
-
     size_t size = 10;
     int * p;
@@ -100,5 +98,4 @@
     free( x );
 #endif
-    free( sout );
 }
 
Index: src/examples/fstream_test.c
===================================================================
--- src/examples/fstream_test.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/fstream_test.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:11:33 2016
-// Update Count     : 42
+// Last Modified On : Wed Feb 17 11:45:43 2016
+// Update Count     : 43
 //
 
@@ -17,6 +17,4 @@
 
 int main( void ) {
-	ofstream *sout = ofstream_stdout();
-	ifstream *sin = ifstream_stdin();
 	int nombre;
 	sout | "Entrez un nombre, s'il vous plaît:\n";
Index: src/examples/hello.c
===================================================================
--- src/examples/hello.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/hello.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:11:49 2016
-// Update Count     : 7
+// Last Modified On : Wed Feb 17 12:11:45 2016
+// Update Count     : 8
 //
 
@@ -17,6 +17,4 @@
 
 int main() {
-	ofstream *sout = ofstream_stdout();
-	ifstream *sin = ifstream_stdin();
 	sout | "Bonjour au monde!\n";
 }
Index: src/examples/identity.c
===================================================================
--- src/examples/identity.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/identity.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:11:58 2016
-// Update Count     : 8
+// Last Modified On : Wed Feb 17 12:17:32 2016
+// Update Count     : 10
 //
 
@@ -22,5 +22,4 @@
 
 int main() {
-	ofstream *sout = ofstream_stdout();
 	sout | "char\t\t\t"					| identity( 'z' ) | endl;
 	sout | "signed int\t\t"				| identity( 4 ) | endl;
@@ -30,7 +29,7 @@
 	sout | "signed long long int\t"		| identity( 4ll ) | endl;
 	sout | "unsigned long long int\t"	| identity( 4ull ) | endl;
-	sout | "float\t\t\t" 				| identity( 4.0f ) | endl;
-	sout | "double\t\t\t"				| identity( 4.0 ) | endl;
-	sout | "long double\t\t"			| identity( 4.0l ) | endl;
+	sout | "float\t\t\t" 				| identity( 4.1f ) | endl;
+	sout | "double\t\t\t"				| identity( 4.1 ) | endl;
+	sout | "long double\t\t"			| identity( 4.1l ) | endl;
 }
 
Index: src/examples/minmax.c
===================================================================
--- src/examples/minmax.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/minmax.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  3 11:14:49 2016
-// Update Count     : 46
+// Last Modified On : Wed Feb 17 12:17:53 2016
+// Update Count     : 47
 //
 
@@ -18,5 +18,4 @@
 
 int main( void ) {
-	ofstream *sout = ofstream_stdout();
 	// char does not have less or greater than.
 	int ?<?( char op1, char op2 ) { return (int)op1 < (int)op2; }
Index: src/examples/quad.c
===================================================================
--- src/examples/quad.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/quad.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:13:48 2016
-// Update Count     : 5
+// Last Modified On : Wed Feb 17 12:19:24 2016
+// Update Count     : 6
 //
 
@@ -27,5 +27,4 @@
 
 int main() {
-	ofstream *sout = ofstream_stdout();
 	int N = 2;
 	sout | "result of quad of " | N | " is " | quad( N ) | endl;
Index: src/examples/quoted_keyword.c
===================================================================
--- src/examples/quoted_keyword.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/quoted_keyword.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:13:58 2016
-// Update Count     : 8
+// Last Modified On : Wed Feb 17 12:19:45 2016
+// Update Count     : 9
 //
 
@@ -28,5 +28,4 @@
 
 int main() {
-	ofstream *sout = ofstream_stdout();
 	sout | `catch` + st.`type` + st.`struct` + `throw` | endl;
 }
Index: src/examples/random.c
===================================================================
--- src/examples/random.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/random.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -7,6 +7,4 @@
 
 int main() {
-	ofstream *sout = ofstream_stdout();
-
 	randseed( getpid() );								// set random seed
 
Index: src/examples/square.c
===================================================================
--- src/examples/square.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/square.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:14:16 2016
-// Update Count     : 25
+// Last Modified On : Wed Feb 17 12:21:58 2016
+// Update Count     : 26
 //
 
@@ -23,5 +23,4 @@
 int main() {
 #if 0
-	ofstream *sout = ofstream_stdout();
 	sout | "result of squaring 9 is " | endl;
 
Index: src/examples/sum.c
===================================================================
--- src/examples/sum.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/sum.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Feb  6 11:57:42 2016
-// Update Count     : 182
+// Last Modified On : Tue Feb 16 23:49:31 2016
+// Update Count     : 189
 //
 
@@ -41,5 +41,4 @@
 int main( void ) {
 	const int low = 5, High = 15, size = High - low;
-	ofstream *sout = ofstream_stdout();
 
 	char s = 0, a[size], v = low;
Index: src/examples/swap.c
===================================================================
--- src/examples/swap.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/swap.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  3 11:14:04 2016
-// Update Count     : 63
+// Last Modified On : Wed Feb 17 12:22:12 2016
+// Update Count     : 64
 //
 
@@ -18,6 +18,4 @@
 
 int main( void ) {
-	ofstream *sout = ofstream_stdout();
-
 	char c1 = 'a', c2 = 'b';
 	sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap ";
Index: src/examples/twice.c
===================================================================
--- src/examples/twice.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/twice.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:14:44 2016
-// Update Count     : 12
+// Last Modified On : Wed Feb 17 12:23:25 2016
+// Update Count     : 13
 //
 
@@ -27,5 +27,4 @@
 	char ?++( char *op ) { char temp = *op; *op += 1; return temp; }
 
-	ofstream *sout = ofstream_stdout();
 	sout | twice( 'a' ) | ' ' | twice( 1 ) | ' ' | twice( 3.2 ) | endl;
 }
Index: src/examples/vector_test.c
===================================================================
--- src/examples/vector_test.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/examples/vector_test.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:14:52 2016
-// Update Count     : 17
+// Last Modified On : Wed Feb 17 12:23:55 2016
+// Update Count     : 18
 //
 
@@ -20,6 +20,4 @@
 
 int main( void ) {
-	ofstream *sout = ofstream_stdout();
-	ifstream *sin = ifstream_stdin();
 	vector_int vec = vector_int_allocate();
 
Index: src/libcfa/fstream
===================================================================
--- src/libcfa/fstream	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/libcfa/fstream	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jan 27 23:47:41 2016
-// Update Count     : 3
+// Last Modified On : Wed Feb 17 14:02:01 2016
+// Update Count     : 22
 //
 
@@ -19,25 +19,27 @@
 #include "iostream"
 
-typedef struct ofstream ofstream;
+// implement context ostream
+struct ofstream;
 
-// implement context ostream
-ofstream *write( ofstream *, const char *, streamsize_type );
-int fail( ofstream * );
+int fail( ofstream * os );
+int flush( ofstream * os );
+void open( ofstream ** os, const char * name, const char * mode );
+void close( ofstream * os );
+ofstream * write( ofstream * os, const char * data, streamsize_type size );
 
-ofstream *ofstream_stdout();
-ofstream *ofstream_stderr();
-ofstream *ofstream_fromfile( const char *name );
-void ofstream_close( ofstream *os );
-
-typedef struct ifstream ifstream;
+extern ofstream * sout, * serr;
 
 // implement context istream
-ifstream *read( ifstream *, char *, streamsize_type );
-ifstream *unread( ifstream *, char );
-int fail( ifstream * );
-int eof( ifstream * );
+struct ifstream;
 
-ifstream *ifstream_stdin();
-ifstream *ifstream_fromfile( const char *name );
+int fail( ifstream * is );
+int eof( ifstream * is );
+void open( ifstream ** is, const char * name, const char * mode );
+void close( ifstream * is );
+ifstream * get( ifstream * is, int * data );
+ifstream * read( ifstream * is, char * data, streamsize_type size );
+ifstream * ungetc( ifstream * is, char c );
+
+extern ifstream *sin;
 
 #endif // __FSTREAM_H__
Index: src/libcfa/fstream.c
===================================================================
--- src/libcfa/fstream.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/libcfa/fstream.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:12:59 2016
-// Update Count     : 6
+// Last Modified On : Wed Feb 17 14:03:05 2016
+// Update Count     : 76
 //
 
@@ -23,102 +23,120 @@
 struct ofstream {
 	FILE *file;
-	int fail;
 };
 
-ofstream *write( ofstream *os, const char *data, streamsize_type size ) {
-	if ( ! os->fail ) {
-		fwrite( data, size, 1, os->file );
-		os->fail = ferror( os->file );
+#define IO_MSG "I/O error "
+
+int fail( ofstream * os ) {
+	return ferror( os->file );
+} // fail
+
+int flush( ofstream * os ) {
+	return fflush( os->file );
+} // flush
+
+void open( ofstream ** os, const char * name, const char * mode ) {
+	FILE *t = fopen( name, mode );
+	if ( t == 0 ) {										// do not change unless successful
+		perror( IO_MSG "open output" );
+		exit( EXIT_FAILURE );
+	} // if
+	(*os)->file = t;
+} // open
+
+void close( ofstream * os ) {
+	if ( os->file == stdout || os->file == stderr ) return;
+
+	if ( fclose( os->file ) == EOF ) {
+		perror( IO_MSG "close output" );
+	} // if 
+} // close
+
+ofstream * write( ofstream * os, const char * data, streamsize_type size ) {
+	if ( fail( os ) ) {
+		fprintf( stderr, "attempt write I/O on failed stream\n" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	if ( fwrite( data, 1, size, os->file ) != size ) {
+		perror( IO_MSG "write" );
+		exit( EXIT_FAILURE );
 	} // if
 	return os;
 } // write
 
-int fail( ofstream *os ) {
-	return os->fail;
-} // fail
+static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_) };
+ofstream *sout = &soutFile;
+static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_) };
+ofstream *serr = &serrFile;
 
-static ofstream *make_ofstream() {
-	ofstream *new_stream = malloc( sizeof( ofstream ) );
-	new_stream->fail = 0;
-	return new_stream;
-} // make_ofstream
-
-ofstream *ofstream_stdout() {
-	ofstream *stdout_stream = make_ofstream();
-	stdout_stream->file = stdout;
-	return stdout_stream;
-} // ofstream_stdout
-
-ofstream *ofstream_stderr() {
-	ofstream *stderr_stream = make_ofstream();
-	stderr_stream->file = stderr;
-	return stderr_stream;
-} // ofstream_stderr
-
-ofstream *ofstream_fromfile( const char *name ) {
-	ofstream *file_stream = make_ofstream();
-	file_stream->file = fopen( name, "w" );
-	file_stream->fail = file_stream->file == 0;
-	return file_stream;
-}
-
-void ofstream_close( ofstream *os ) {
-	if ( os->file != stdout && os->file != stderr ) {
-		os->fail = fclose( os->file );
-	}
-	free( os );
-}
+//---------------------------------------
 
 struct ifstream {
 	FILE *file;
-	int fail;
-	int eof;
 };
 
-ifstream *read( ifstream *is, char *data, streamsize_type size ) {
-	if ( ! is->fail && ! is->eof ) {
-		fread( data, size, 1, is->file );
-		is->fail = ferror( is->file );
-		is->eof = feof( is->file );
-	}
+int fail( ifstream * is ) {
+	return ferror( is->file );
+} // fail
+
+int eof( ifstream * is ) {
+	return feof( is->file );
+} // eof
+
+ifstream * get( ifstream * is, int * data ) {
+	if ( fscanf( is->file, "%d", data ) == EOF ) {
+		if ( ferror( is->file ) ) {
+			fprintf( stderr, "invalid int read\n" );
+			exit( EXIT_FAILURE );
+		} // if
+	} // if
 	return is;
-}
+} // read
+
+ifstream * read( ifstream * is, char * data, streamsize_type size ) {
+	if ( fail( is ) ) {
+		fprintf( stderr, "attempt read I/O on failed stream\n" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	if ( fread( data, size, 1, is->file ) == 0 ) {
+		perror( IO_MSG "read" );
+		exit( EXIT_FAILURE );
+	} // if
+	return is;
+} // read
   
-ifstream *unread( ifstream *is, char c ) {
-	if ( ! is->fail ) {
-		if ( ! EOF == ungetc( c, is->file ) ) {
-			is->fail = 1;
-		}
-	}
+ifstream *ungetc( ifstream * is, char c ) {
+	if ( fail( is ) ) {
+		fprintf( stderr, "attempt ungetc I/O on failed stream\n" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	if ( ungetc( c, is->file ) == EOF ) {
+		perror( IO_MSG "ungetc" );
+		exit( EXIT_FAILURE );
+	} // if
 	return is;
-}
+} // ungetc
 
-int fail( ifstream *is ) {
-	return is->fail;
-}
+void open( ifstream ** is, const char * name, const char * mode ) {
+	FILE *t = fopen( name, mode );
+	if ( t == 0 ) {										// do not change unless successful
+		perror( IO_MSG "open input" );
+		exit( EXIT_FAILURE );
+	} // if
+	(*is)->file = t;
+} // open
 
-int eof( ifstream *is ) {
-	return is->eof;
-}
+void close( ifstream * is ) {
+	if ( is->file == stdin ) return;
 
-static ifstream *make_ifstream() {
-	ifstream *new_stream = malloc( sizeof( ifstream ) );
-	new_stream->fail = 0;
-	new_stream->eof = 0;
-	return new_stream;
-}
+	if ( fclose( is->file ) == EOF ) {
+		perror( IO_MSG "close input" );
+	} // if 
+} // close
 
-ifstream *ifstream_stdin() {
-	ifstream *stdin_stream = make_ifstream();
-	stdin_stream->file = stdin;
-	return stdin_stream;
-}
-
-ifstream *ifstream_fromfile( const char *name ) {
-	ifstream *file_stream = make_ifstream();
-	file_stream->file = fopen( name, "r" );
-	file_stream->fail = file_stream->file == 0;
-	return file_stream;
-}
+static ifstream sinFile = { (FILE *)(&_IO_2_1_stdin_) };
+ifstream *sin = &sinFile;
 
 // Local Variables: //
Index: src/libcfa/iostream
===================================================================
--- src/libcfa/iostream	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/libcfa/iostream	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jan 29 15:50:36 2016
-// Update Count     : 29
+// Last Modified On : Wed Feb 17 14:04:24 2016
+// Update Count     : 32
 //
 
@@ -22,8 +22,8 @@
 
 context ostream( dtype ostype ) {
-	ostype *write( ostype *, const char *, streamsize_type );
 	int fail( ostype * );
+	int flush( ostype * );
+	ostype * write( ostype *, const char *, streamsize_type );
 };
-
 context writeable( type T ) {
 	forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
@@ -52,21 +52,18 @@
 
 // writes the range [begin, end) to the given stream
-forall( type elt_type | writeable( elt_type ),
-		type iterator_type | iterator( iterator_type, elt_type ),
-		dtype os_type | ostream( os_type ) )
+forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
 void write( iterator_type begin, iterator_type end, os_type *os );
 
-forall( type elt_type | writeable( elt_type ),
-		type iterator_type | iterator( iterator_type, elt_type ),
-		dtype os_type | ostream( os_type ) )
+forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
 void write_reverse( iterator_type begin, iterator_type end, os_type *os );
 
-//******************************************************************************
+//---------------------------------------
 
 context istream( dtype istype ) {
-	istype *read( istype *, char *, streamsize_type );
-	istype *unread( istype *, char );
 	int fail( istype * );
 	int eof( istype * );
+	istype * get( istype *, int * );
+	istype * read( istype *, char *, streamsize_type );
+	istype * ungetc( istype *, char );
 };
 
Index: src/libcfa/iostream.c
===================================================================
--- src/libcfa/iostream.c	(revision 52f85e0c522e3914bc6c3fa98cf315bdf8c09347)
+++ src/libcfa/iostream.c	(revision 6ba0659196615bb32989214ed6976c448620b387)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 10 15:48:46 2016
-// Update Count     : 66
+// Last Modified On : Wed Feb 17 14:19:56 2016
+// Update Count     : 76
 //
 
@@ -111,26 +111,24 @@
 forall( dtype ostype, dtype retostype | ostream( ostype ) | ostream( retostype ) ) 
 retostype * ?|?( ostype *os, retostype * (*manip)(ostype*) ) {
-  return manip(os);
+  return manip( os );
 }
 
 forall( dtype ostype | ostream( ostype ) ) 
 ostype * endl( ostype * os ) {
-  os | "\n";
-  // flush
-  return os;
+	os | "\n";
+	flush( os );
+	return os;
 } // endl
 
-forall( type elt_type | writeable( elt_type ),
-		type iterator_type | iterator( iterator_type, elt_type ),
+//---------------------------------------
+
+forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ),
 		dtype os_type | ostream( os_type ) )
 void write( iterator_type begin, iterator_type end, os_type *os ) {
-	void print( elt_type i ) {
-		os | i | ' ';
-	}
+	void print( elt_type i ) { os | i | ' '; }
 	for_each( begin, end, print );
 } // ?|?
 
-forall( type elt_type | writeable( elt_type ),
-		type iterator_type | iterator( iterator_type, elt_type ),
+forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ),
 		dtype os_type | ostream( os_type ) )
 void write_reverse( iterator_type begin, iterator_type end, os_type *os ) {
@@ -139,4 +137,5 @@
 } // ?|?
 
+//---------------------------------------
 
 forall( dtype istype | istream( istype ) )
@@ -147,22 +146,5 @@
 forall( dtype istype | istream( istype ) )
 istype * ?|?( istype *is, int *ip ) {
-	char cur;
-  
-	// skip some whitespace
-	do {
-		is | &cur;
-		if ( fail( is ) || eof( is ) ) return is;
-	} while ( !( cur >= '0' && cur <= '9' ) );
-  
-	// accumulate digits
-	*ip = 0;
-	while ( cur >= '0' && cur <= '9' ) {
-		*ip = *ip * 10 + ( cur - '0' );
-		is | &cur;
-		if ( fail( is ) || eof( is ) ) return is;
-	}
-  
-	unread( is, cur );
-	return is;
+	return get( is, ip );
 } // ?|?
 
