Index: doc/uC++toCFA/uC++toCFA.tex
===================================================================
--- doc/uC++toCFA/uC++toCFA.tex	(revision 567a75f3b6d1baf41c3bb74c76aa9b0ea6342ae8)
+++ doc/uC++toCFA/uC++toCFA.tex	(revision 0a10dc834299fcd94f5955aa965dee79a686f25a)
@@ -11,6 +11,6 @@
 %% Created On       : Wed Apr  6 14:53:29 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Thu Aug 28 13:41:34 2025
-%% Update Count     : 6493
+%% Last Modified On : Mon Sep  8 18:10:30 2025
+%% Update Count     : 6534
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -138,6 +138,6 @@
 \section{Introduction}
 
-\CFA is NOT an object-oriented programming-language.
-\CFA uses parametric polymorphism and allows overloading of variables and routines:
+\CFA is an extension of the C programming with a trait-style type-system rather then templates and objects as in \CC.
+\CFA allows overloading of variables and routines using the left-hand assignment type to precisely select among overloaded names.
 \begin{cfa}
 int x;  char x;  double x;    // overload name x
@@ -160,5 +160,5 @@
 \end{tabular}
 \end{cquote}
-\CFA has rebindable references.
+\CFA generalizes reference types, allowing multiple and rebindable references (like pointers).
 \begin{cquote}
 \begin{tabular}{@{}l|l@{}}
@@ -189,20 +189,4 @@
 int & @const@ & @const@ crcr = cr; // generalize
 \end{cfa}
-Aggregate qualification is reduced or eliminated by opening scopes using the @with@ clause.
-\begin{cfa}
-struct S { int i; int j; double m; };  // field i has same type in structures S and T
-struct T { int i; int k; int m; };
-void foo( S s, T t ) @with( s, t )@ {   // open structure scope s and t in parallel
-	j + k;				$\C[1.6in]{// unambiguous, s.j + t.k}$
-	m = 5.0;			$\C{// unambiguous, s.m = 5.0}$
-	m = 1;				$\C{// unambiguous, t.m = 1}$
-	int a = m;			$\C{// unambiguous, a = t.m}$
-	double b = m;		$\C{// unambiguous, b = s.m}$
-	int c = s.i + t.i;	$\C{// unambiguous with qualification}$
-	(double)m;			$\C{// unambiguous with cast s.m}\CRT$
-}
-\end{cfa}
-\noindent
-In subsequent code examples, the left example is \CC/\uC and the right example is \CFA.
 
 
@@ -246,5 +230,5 @@
 \end{tabular}
 \end{cquote}
-To simplify loop iteration a range is provided, specified from low to high, and a traversal direction, ascending (@+@) or descending (@-@).
+To simplify loop iteration a range is provided, from low to high, and a traversal direction, ascending (@+@) or descending (@-@).
 The following is the syntax for the loop range, where @[@\,@]@ means optional.
 \begin{cfa}[deletekeywords=default]
@@ -449,4 +433,5 @@
 \section{String}
 
+The @string@ type in \CFA is very similar to that in \CC.
 \begin{cquote}
 \begin{tabular}{@{}l|l@{}}
@@ -475,5 +460,5 @@
 s1 == s2; s1 != s2;
 s1 < s2;  s1 <= s2;  s1 > s2;  s1 >= s2;
-len( s1 );
+len( s1 ); // like C strlen( s1 )
 s1[3];
 s1( 2 );  s1( 2, 3 );
@@ -492,4 +477,5 @@
 
 \begin{cquote}
+\setlength{\tabcolsep}{5pt}
 \begin{tabular}{@{}l|l@{}}
 \begin{uC++}
@@ -501,5 +487,5 @@
 	S( int i ) { S::i = i; }
 };
-void f( uArrayRef( S, parm ) );
+void f( @uArrayRef( S, parm )@ );
 int main() {
 	enum { N = 5 };
@@ -523,5 +509,5 @@
 };
 void ?{}( S & s, int i ) { s.i = i; }
-forall( [N] ) void f( array( S, N ) & parm ) {}
+@forall( [N] )@ void f( @array( S, N ) & parm@ ) {}
 int main() {
 	enum { N = 5 };
@@ -542,4 +528,6 @@
 \section{\texorpdfstring{Structures (object-oriented \protect\vs routine style)}{Structures (object-oriented vs. routine style)}}
 
+\CFA is NOT an object-oriented programming-language, so there is no receiver (\lstinline[language=c++]{this}) or nested structure routines.
+The equivalent of a \emph{member} routine has an explicit structure parameter in any parameter position (often the first).
 \begin{cquote}
 \begin{tabular}{@{}l|l@{}}
@@ -567,8 +555,25 @@
 \end{tabular}
 \end{cquote}
+Aggregate qualification is reduced or eliminated by opening scopes using the @with@ clause.
+\begin{cfa}
+struct S { int i; int j; double m; };  // field i has same type in structures S and T
+struct T { int i; int k; int m; };
+void foo( S s, T t ) @with( s, t )@ {   // open structure scope s and t in parallel
+	j + k;				$\C[1.6in]{// unambiguous, s.j + t.k}$
+	m = 5.0;			$\C{// unambiguous, s.m = 5.0}$
+	m = 1;				$\C{// unambiguous, t.m = 1}$
+	int a = m;			$\C{// unambiguous, a = t.m}$
+	double b = m;		$\C{// unambiguous, b = s.m}$
+	int c = s.i + t.i;	$\C{// unambiguous with qualification}$
+	(double)m;			$\C{// unambiguous with cast s.m}\CRT$
+}
+\end{cfa}
+\noindent
+In subsequent code examples, the left example is \CC/\uC and the right example is \CFA.
 
 
 \section{Constructor / Destructor}
 
+A constructor/destructor must have its structure type as the first parameter and be a reference.
 \begin{cquote}
 \begin{tabular}{@{}l|l@{}}
@@ -599,19 +604,19 @@
 struct S { int i, j; };
 
-void @?{}@( S & s ) { s.i = s.j = 3; } $\C[3in]{// default}$
-void @?{}@( S & s, int i, int j ) { s.i = i; s.j = j; } $\C{// initializer}$
-void @?{}@( S & s, const S rhs ) { ?{}( s, rhs.i, rhs.j ); } $\C{// copy}$
-void @^?{}@( S & s ) { s.i = 0; s.j = 0; } $\C{// destructor}\CRT$
+void @?{}@( @S & s@ ) { s.i = s.j = 3; } $\C[3in]{// default}$
+void @?{}@( @S & s@, int i, int j ) { s.i = i; s.j = j; } $\C{// initializer}$
+void @?{}@( @S & s@, const S rhs ) { ?{}( s, rhs.i, rhs.j ); } $\C{// copy}$
+void @^?{}@( @S & s@ ) { s.i = 0; s.j = 0; } $\C{// destructor}\CRT$
 
 S s0;
 S s1 = { 1, 2 };
-// cannot use 0/1 (zero_t/one_t) with "new"
-S * s2 = new( 1@n@, 2 ); // n => (int) 
+// bug, cannot use 0/1 (zero_t/one_t) with "new"
+S * s2 = new( 0@n@, 2 ); // suffix n => (natural int)
 delete( s2 );
-s2 = new( 1n, 2 );
+s2 = new( 1@n@, 2 );
 delete( s2 );
-S & s3 = *new( 1n, 2 );
+S & s3 = *new( 2, 2 );
 delete( &s3 );
-&s3 = &*new( 1n, 2 );
+&s3 = &*new( 3, 2 );
 delete( &s3 );
 \end{cfa}
@@ -625,5 +630,4 @@
 \begin{tabular}{@{}l|ll@{}}
 \begin{uC++}
-
 @_Coroutine@ C {
 	// private coroutine fields
@@ -718,4 +722,23 @@
 		val( val ) {}
 };
+\end{uC++}
+&
+\begin{cfa}
+#include <fstream.hfa>
+#include <mutex_stmt.hfa>
+#include <actor.hfa>
+
+struct StrMsg {
+	@inline message;@ // derived message
+	const char * val; // string message
+};
+void ?{}( StrMsg & msg, const char * str ) {
+	@set_allocation( msg, Delete );@ // delete after use
+	msg.val = str;
+}
+\end{cfa}
+\end{tabular}
+\begin{tabular}{@{}l|ll@{}}
+\begin{uC++}
 _Actor Hello { ${\color{red}\LstCommentStyle{// : public uActor}}$
 	Allocation receive( Message & msg ) {
@@ -741,16 +764,4 @@
 &
 \begin{cfa}
-#include <fstream.hfa>
-#include <mutex_stmt.hfa>
-#include <actor.hfa>
-
-struct StrMsg {
-	@inline message;@ // derived message
-	const char * val; // string message
-};
-void ?{}( StrMsg & msg, const char * str ) {
-	@set_allocation( msg, Delete );@ // delete after use
-	msg.val = str;
-}
 struct Hello { @inline actor;@ }; // derived actor
 allocation receive( Hello & receiver, @start_msg_t@ & ) {
@@ -898,5 +909,6 @@
 \end{cquote}
 
-\newpage
+
+\enlargethispage{1000pt}
 
 \section{Monitor}
@@ -967,6 +979,5 @@
 \end{cquote}
 
-\enlargethispage{1000pt}
-
+\newpage
 \noindent
 External Scheduling
