Index: doc/theses/mike_brooks_MMath/programs/bkgd-carray-arrty.c
===================================================================
--- doc/theses/mike_brooks_MMath/programs/bkgd-carray-arrty.c	(revision df699e080a754d9c4714ee9fe19c05edccc9bbad)
+++ doc/theses/mike_brooks_MMath/programs/bkgd-carray-arrty.c	(revision 061b001218ffd1d509ae34c3da5a36134799b5c0)
@@ -148,8 +148,8 @@
 void stx2() { const T x[10];
 //            x[5] = 3.14; // bad
-			}
+}
 void stx3() { T const x[10];
 //            x[5] = 3.14; // bad
-			}
+}
 
 // Local Variables: //
Index: doc/theses/mike_brooks_MMath/programs/hello-accordion.cfa
===================================================================
--- doc/theses/mike_brooks_MMath/programs/hello-accordion.cfa	(revision df699e080a754d9c4714ee9fe19c05edccc9bbad)
+++ doc/theses/mike_brooks_MMath/programs/hello-accordion.cfa	(revision 061b001218ffd1d509ae34c3da5a36134799b5c0)
@@ -2,4 +2,5 @@
 #include <stdlib.hfa>
 #include <array.hfa>
+#include <locale.h>							// setlocale
 
 
@@ -7,12 +8,9 @@
 
 
-
-
-forall( T, [Nclients], [Ncosts] )
-struct request {
-	unsigned int requestor_id;
-	array( T, Nclients ) impacted_client_ids; // nested VLA
-	array( float, Ncosts ) cost_contribs; // nested VLA
-	float total_cost;
+forall( T, @[NprovTerty]@, @[Nmunicipalities]@ )
+struct CanadaPop {
+	array( T, @NprovTerty@ ) provTerty; $\C{// nested VLA}$
+	array( T, @Nmunicipalities@ ) municipalities; $\C{// nested VLA}$
+	int total_pt, total_mun;
 };
 
@@ -20,9 +18,9 @@
 // TODO: understand (fix?) why these are needed (autogen seems to be failing ... is typeof as struct member nayok?)
 
-forall( T, [Nclients], [Ncosts] )
-	void ?{}( T &, request( T, Nclients, Ncosts ) & this ) {}
+forall( T, [NprovTerty], [Nmunicipalities] )
+	void ?{}( T &, CanadaPop( T, NprovTerty, Nmunicipalities ) & this ) {}
 
-forall( T &, [Nclients], [Ncosts] )
-	void ^?{}( request( T, Nclients, Ncosts ) & this ) {}
+forall( T &, [NprovTerty], [Nmunicipalities] )
+	void ^?{}( CanadaPop( T, NprovTerty, Nmunicipalities ) & this ) {}
 
 
@@ -39,11 +37,10 @@
 
 
-forall( T, [Nclients], [Ncosts] )
-void summarize( request( T, Nclients, Ncosts ) & r ) {
-	r.total_cost = 0;
-	for( i; Ncosts )
-		r.total_cost += r.cost_contribs[i];
-	// say the cost is per-client, to make output vary
-	r.total_cost *= Nclients;
+
+forall( T, [NprovTerty], [Nmunicipalities] )
+void check( CanadaPop( T, NprovTerty, Nmunicipalities ) & pop ) with( pop ) {
+	total_pt = total_mun = 0;
+	for ( i; NprovTerty ) total_pt += provTerty[i];
+	for ( i; Nmunicipalities ) total_mun += municipalities[i];
 }
 
@@ -59,19 +56,22 @@
 
 
+
+
 int main( int argc, char * argv[] ) {
-	const int ncl = ato( argv[1] );
-	const int nco = 2;
-
-	request( int, ncl, nco ) r;
-	r.cost_contribs[0] = 100;
-	r.cost_contribs[1] = 0.1;
-
-	summarize(r);
-	sout | "Total cost:" | r.total_cost;
+	const int npt = ato( argv[1] ), nmun = ato( argv[2] );
+	@CanadaPop( int, npt, nmun ) pop;@
+	// read in population numbers
+	@check( pop );@
+	sout | setlocale( LC_NUMERIC, getenv( "LANG" ) );
+	sout | "Total province/territory:" | pop.total_pt;
+	sout | "Total municipalities:" | pop.total_mun;
 }
 /*
-$\$$ ./a.out 5
-Total cost: 500.5
-$\$$ ./a.out 6
-Total cost: 600.6
+$\$$ ./a.out  13  3573
+Total province/territory: 36,991,981
+Total municipalities: 36,991,981
 */
+
+// Local Variables: //
+// compile-command: "sed -f sedcmd hello-accordion.cfa > ../build/tmp.cfa; cfa ../build/tmp.cfa -Wall -Wextra" //
+// End: //
Index: doc/theses/mike_brooks_MMath/programs/hello-array.cfa
===================================================================
--- doc/theses/mike_brooks_MMath/programs/hello-array.cfa	(revision df699e080a754d9c4714ee9fe19c05edccc9bbad)
+++ doc/theses/mike_brooks_MMath/programs/hello-array.cfa	(revision 061b001218ffd1d509ae34c3da5a36134799b5c0)
@@ -8,9 +8,9 @@
 
 
-forall( [N] ) // array bound
-array(bool, N) & f( array(float, N) & a, array(float, N) & b ) {
-	array(bool, N) & ret = *alloc(); // sizeof used by alloc
-	for( i; N ) {
-		ret[i] = 0.005 > 2 * (abs(a[i] - b[i])) / (abs(a[i]) + abs(b[i]));
+forall( [@N@] )								$\C{// array dimension}$
+array( bool, @N@) & f( array( float, @N@ ) & x, array( float, @N@ ) & y ) {
+	array( bool, @N@ ) & ret = *@alloc@();	$\C{// sizeof ret  used by alloc}$
+	for ( i; @N@ ) {
+		ret[i] = 0.005 > 2 * (abs( x[i] - y[i] )) / (abs( x[i]) + abs(y[i] ));
 	}
 	return ret;
@@ -29,16 +29,16 @@
 
 int main( int argc, char * argv[] ) {
-	int n = ato( argv[1] );
-	array(float, n) a, b; // VLA
-	for ( i; n ) {
-		a[i] = 3.14 / (i + 1);
-		b[i] = a[i] + 0.005 ;
+	const int @n@ = ato( argv[1] );			$\C{// deduce conversion type}$
+	array( float, @n@ ) x, y;				$\C{// VLAs}$
+	for ( i; n ) {							$\C{// initialize arrays}$
+		x[i] = 3.14 / (i + 1);
+		y[i] = x[i] + 0.005 ;
 	}
-	array(bool, n) & result = f( a, b ); // call
-	sout | "result: " | nonl;
+	array( bool, @n@ ) & result = @f( x, y )@; $\C{// call}$
+	sout | "result: " | nonl;				$\C{// print result}$
 	for ( i; n )
 		sout | result[i] | nonl;
 	sout | nl;
-	free( &result ); // free returned storage
+	free( &result );						$\C{// free result storage}$
 }
 /*
@@ -50,17 +50,17 @@
 
 void fred() {
-	array(float, 10) a;
-	array(float, 20) b;
-	f( a, a );
-	f( b, b );
-	f( a, b );
+	array( float, @10@ ) x;
+	array( float, @20@ ) y;
+	f( x, x );
+	f( y, y );
+//	f( x, y );
 }
 
 #ifdef SHOWERR1
 forall( [M], [N] )
-void bad( array(float, M) &a, array(float, N) &b ) {
-	f( a, a ); // ok
-	f( b, b ); // ok
-	f( a, b ); // error
+void bad( array(float, M) &x, array(float, N) &y ) {
+	f( x, x );		$\C[1.5in]{// ok}$
+	f( y, y );		$\C{// ok}$
+	f( x, y );		$\C{// error}\CRT$
 }
 #endif
@@ -69,7 +69,10 @@
 
 forall( [M], [N] )
-void bad_fixed( array(float, M) & a, array(float, N) & b ) {
-	if ( M == N ) {
-		f( a, (array(float, M) &)b ); // cast b to matching type
-	}
+void bad_fixed( array( float, M ) & x, array( float, N ) & y ) {
+	if ( M == N )
+		f( x, @(array( float, M ) &)@y ); $\C{// cast y to matching type}$
 }
+
+// Local Variables: //
+// compile-command: "sed -f sedcmd hello-array.cfa > ../build/tmp.cfa; cfa ../build/tmp.cfa -Wall -Wextra" //
+// End: //
Index: doc/theses/mike_brooks_MMath/programs/hello-md.cfa
===================================================================
--- doc/theses/mike_brooks_MMath/programs/hello-md.cfa	(revision df699e080a754d9c4714ee9fe19c05edccc9bbad)
+++ doc/theses/mike_brooks_MMath/programs/hello-md.cfa	(revision 061b001218ffd1d509ae34c3da5a36134799b5c0)
@@ -39,7 +39,7 @@
 
 forall( [N] )
-void print1d_cstyle( array(float, N) & c );
+void print1d_cstyle( array( float, N ) & r ); $\C{// C style}$
 
-forall( [N], C & | ar( C, float, N ) )
+forall( [N], C & @| ar( C, float, N )@ ) $\C{// add trait}$
 void print1d( C & c );
 
@@ -59,10 +59,10 @@
 
 forall( [N] )
-void print1d_cstyle( array(float, N) & c ) {
-	for ( i; N ) {
-		sout | c[i] | nonl;
-	}
+void print1d_cstyle( array( float, N ) & r ) { $\C{// C style}$
+	for ( i; N ) sout | r[i] | nonl;
 	sout | nl;
 }
+
+
 
 
@@ -98,5 +98,5 @@
 
 
-void fill( array(float, 5, 7) & a ) {
+void fill( array( float, 5, 7 ) & a ) {
 	for ( i; (ptrdiff_t) 5 ) {
 		for ( j; 7 ) {
@@ -116,12 +116,13 @@
 
 
-array( float, 5, 7 ) a;
-fill(a);
+array( float, 5, 7 ) m;
+fill( m );
 /*
-0.0  0.1  0.2  0.3  0.4  0.5  0.6  
-1.0  1.1  1.2  1.3  1.4  1.5  1.6  
-2.0  2.1  2.2  2.3  2.4  2.5  2.6  
-3.0  3.1  3.2  3.3  3.4  3.5  3.6  
-4.0  4.1  4.2  4.3  4.4  4.5  4.6
+r/c   0     1     2     3     4     5     6
+0  0.0  0.1  0.2  @0.3@  0.4  0.5  0.6  
+1  1.0  1.1  1.2  @1.3@  1.4  1.5  1.6  
+2  @2.0  2.1  2.2  2.3  2.4  2.5  2.6@  
+3  3.0  3.1  3.2  @3.3@  3.4  3.5  3.6  
+4  4.0  4.1  4.2  @4.3@  4.4  4.5  4.6
 */
 
@@ -137,21 +138,20 @@
 
 
-
-print1d_cstyle( a[ 2 ] );  // 2.0  2.1  2.2  2.3  2.4  2.5  2.6
+print1d_cstyle( m[ 2 ] );  $\C{// row 2:  2.0  2.1  2.2  2.3  2.4  2.5  2.6}$
 
 
 
 
-print1d( a[ 2 ] );  // 2.0  2.1  2.2  2.3  2.4  2.5  2.6
+print1d( m[ 2 ] );  $\C{// row:  2.0  2.1  2.2  2.3  2.4  2.5  2.6}$
 
 
 
 
-print1d( a[ 2, all ] );  // 2.0  2.1  2.2  2.3  2.4  2.5  2.6
-print1d( a[ all, 3 ] );  // 0.3  1.3  2.3  3.3  4.3
+print1d( m[ 2, all ] );  $\C{// row 2:  2.0  2.1  2.2  2.3  2.4  2.5  2.6}$
+print1d( m[ all, 3 ] );  $\C{// column 3:  0.3  1.3  2.3  3.3  4.3}$
 
 
 
-print1d_cstyle( a[ 2, all ] );
+print1d_cstyle( m[ 2, all ] );
 
 
@@ -163,5 +163,5 @@
 #ifdef SHOW_ERROR_1
 
-print1d_cstyle( a[ all, 2 ] );  // bad
+print1d_cstyle( m[ all, 2 ] );  $\C{// bad}$
 
 #endif
Index: doc/theses/mike_brooks_MMath/programs/lst-issues-attach-reduction.hpp
===================================================================
--- doc/theses/mike_brooks_MMath/programs/lst-issues-attach-reduction.hpp	(revision df699e080a754d9c4714ee9fe19c05edccc9bbad)
+++ doc/theses/mike_brooks_MMath/programs/lst-issues-attach-reduction.hpp	(revision 061b001218ffd1d509ae34c3da5a36134799b5c0)
@@ -101,6 +101,6 @@
 class list {
 	struct node {
-		@LIST_ENTRY(node) links;@
-		@El elem;@
+		LIST_ENTRY(node) links;
+		El elem;
 	};
 	LIST_HEAD(Impl, node);
@@ -111,5 +111,5 @@
 	}
 	void push_front( const El & src ) {
-		node * n = @new node()@;
+		node * n = new node();
 		n->elem = src;
 		LIST_INSERT_HEAD(&impl, n, links);
Index: doc/theses/mike_brooks_MMath/programs/lst-issues-wrapped-byref.run.cpp
===================================================================
--- doc/theses/mike_brooks_MMath/programs/lst-issues-wrapped-byref.run.cpp	(revision df699e080a754d9c4714ee9fe19c05edccc9bbad)
+++ doc/theses/mike_brooks_MMath/programs/lst-issues-wrapped-byref.run.cpp	(revision 061b001218ffd1d509ae34c3da5a36134799b5c0)
@@ -49,5 +49,5 @@
 for (auto const& cur : reqs)
 	printf("{%d %d} ", cur->pri, cur->rqr);
-printf("\n");
+	printf("\n");
 
 }
