Index: doc/refrat/refrat.tex
===================================================================
--- doc/refrat/refrat.tex	(revision a7528832a046957eb3c40dcea393f8024b8400a5)
+++ doc/refrat/refrat.tex	(revision 78885b5b4e46d2fb5e2e2f6608cd9a636da8c48d)
@@ -1,2 +1,18 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% 
+%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+%%
+%% The contents of this file are covered under the licence agreement in the
+%% file "LICENCE" distributed with Cforall.
+%% 
+%% refrat.tex -- 
+%% 
+%% Author           : Peter A. Buhr
+%% Created On       : Wed Apr  6 14:52:25 2016
+%% Last Modified By : Peter A. Buhr
+%% Last Modified On : Wed Apr  6 21:57:27 2016
+%% Update Count     : 2
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 % requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
 
@@ -5,5 +21,4 @@
 
 % Latex packages used in the document.
-
 \usepackage{fullpage,times}
 \usepackage{xspace}
@@ -23,5 +38,5 @@
 % Names used in the document.
 
-\newcommand{\CFA}{C$\forall$\xspace}	% set language symbolic name
+\newcommand{\CFA}{C$\mathbf\forall$\xspace}	% set language symbolic name
 \newcommand{\CFL}{Cforall\xspace}		% set language text name
 \newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
@@ -151,7 +166,8 @@
 % CFA based on ANSI C
 \lstdefinelanguage{CFA}[ANSI]{C}%
-{morekeywords={asm,_Alignas,_Alignof,_At,_Atomic,_Bool,catch,catchResume,choose,_Complex,trait,disable,dtype,enable,
-	fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,lvalue,_Noreturn,otype,restrict,_Static_assert,
-	_Thread_local,throw,throwResume,try,},
+{morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
+    _Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
+	fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
+	_Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
 }%
 
@@ -163,7 +179,10 @@
 xleftmargin=\parindent,
 escapechar=@,
+mathescape=true,
 keepspaces=true,
 showstringspaces=false,
 showlines=true,
+aboveskip=6pt,
+belowskip=4pt,
 }%
 
@@ -171,9 +190,12 @@
 % replace/adjust listings characters that look bad in sanserif
 \lst@CCPutMacro
-\lst@ProcessOther{"2D}{\lst@ttfamily{-{}}{{\ttfamily\upshape -}}} % replace minus
+\lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote
+\lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote
+\lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus
 \lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
 \lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
 \lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
-\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
+\lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
+\lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote
 \lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
 %\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
@@ -3843,17 +3865,17 @@
 ``\lstinline$Safe_pointer$ acts like a pointer to \lstinline$int$''.
 \begin{lstlisting}
-trait ptr_to( type P | pointer( P ), otype T ) {@\impl{ptr_to}@@\use{pointer}@
+trait ptr_to( otype P | pointer( P ), otype T ) {@\impl{ptr_to}@@\use{pointer}@
 	lvalue T *?( P );
 	lvalue T ?[?]( P, long int );
 };
-trait ptr_to_const( type P | pointer( P ), otype T ) {@\impl{ptr_to_const}@
+trait ptr_to_const( otype P | pointer( P ), otype T ) {@\impl{ptr_to_const}@
 	const lvalue T *?( P );
 	const lvalue T ?[?]( P, long int );@\use{pointer}@
 };
-trait ptr_to_volatile( type P | pointer( P ), otype T ) }@\impl{ptr_to_volatile}@
+trait ptr_to_volatile( otype P | pointer( P ), otype T ) }@\impl{ptr_to_volatile}@
 	volatile lvalue T *?( P );
 	volatile lvalue T ?[?]( P, long int );@\use{pointer}@
 };
-trait ptr_to_const_volatile( type P | pointer( P ), otype T ) }@\impl{ptr_to_const_volatile}@
+trait ptr_to_const_volatile( otype P | pointer( P ), otype T ) }@\impl{ptr_to_const_volatile}@
 	const volatile lvalue T *?( P );@\use{pointer}@
 	const volatile lvalue T ?[?]( P, long int );
@@ -3865,18 +3887,18 @@
 ``\lstinline$ptr_to$'' specifications.
 \begin{lstlisting}
-trait m_l_ptr_to( type P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to}@ otype T | ptr_to( P, T )@\use{ptr_to}@ {
+trait m_l_ptr_to( otype P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to}@ otype T | ptr_to( P, T )@\use{ptr_to}@ {
 	P ?=?( P *, T * );
 	T * ?=?( T **, P );
 };
-trait m_l_ptr_to_const( type P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_const}@ otype T | ptr_to_const( P, T )@\use{ptr_to_const}@) {
+trait m_l_ptr_to_const( otype P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_const}@ otype T | ptr_to_const( P, T )@\use{ptr_to_const}@) {
 	P ?=?( P *, const T * );
 	const T * ?=?( const T **, P );
 };
-trait m_l_ptr_to_volatile( type P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_volatile}@ otype T | ptr_to_volatile( P, T )) {@\use{ptr_to_volatile}@
+trait m_l_ptr_to_volatile( otype P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_volatile}@ otype T | ptr_to_volatile( P, T )) {@\use{ptr_to_volatile}@
 	P ?=?( P *, volatile T * );
 	volatile T * ?=?( volatile T **, P );
 };
-trait m_l_ptr_to_const_volatile( type P | ptr_to_const_volatile( P ),@\use{ptr_to_const_volatile}@@\impl{m_l_ptr_to_const_volatile}@
-		type T | m_l_ptr_to_volatile( P, T ) | m_l_ptr_to_const( P )) {@\use{m_l_ptr_to_const}@@\use{m_l_ptr_to_volatile}@
+trait m_l_ptr_to_const_volatile( otype P | ptr_to_const_volatile( P ),@\use{ptr_to_const_volatile}@@\impl{m_l_ptr_to_const_volatile}@
+		otype T | m_l_ptr_to_volatile( P, T ) | m_l_ptr_to_const( P )) {@\use{m_l_ptr_to_const}@@\use{m_l_ptr_to_volatile}@
 	P ?=?( P *, const volatile T * );
 	const volatile T * ?=?( const volatile T **, P );
Index: doc/user/user.tex
===================================================================
--- doc/user/user.tex	(revision a7528832a046957eb3c40dcea393f8024b8400a5)
+++ doc/user/user.tex	(revision 78885b5b4e46d2fb5e2e2f6608cd9a636da8c48d)
@@ -1,2 +1,18 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% 
+%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+%%
+%% The contents of this file are covered under the licence agreement in the
+%% file "LICENCE" distributed with Cforall.
+%% 
+%% user.tex -- 
+%% 
+%% Author           : Peter A. Buhr
+%% Created On       : Wed Apr  6 14:53:29 2016
+%% Last Modified By : Peter A. Buhr
+%% Last Modified On : Wed Apr  6 17:37:39 2016
+%% Update Count     : 34
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 % requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
 
@@ -5,5 +21,8 @@
 
 % Latex packages used in the document.
-
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage[latin1]{inputenc}
+\usepackage{upquote}
 \usepackage{fullpage,times}
 \usepackage{xspace}
@@ -24,5 +43,5 @@
 % Names used in the document.
 
-\newcommand{\CFA}{C$\forall$\xspace}	% set language symbolic name
+\newcommand{\CFA}{C$\mathbf\forall$\xspace}	% set language symbolic name
 \newcommand{\CFL}{Cforall\xspace}		% set language text name
 \newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
@@ -160,7 +179,9 @@
 % CFA based on ANSI C
 \lstdefinelanguage{CFA}[ANSI]{C}%
-{morekeywords={asm,_Alignas,_Alignof,_At,_Atomic,_Bool,catch,catchResume,choose,_Complex,trait,disable,dtype,enable,
-	fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,lvalue,_Noreturn,otype,restrict,_Static_assert,
-	_Thread_local,throw,throwResume,try,},
+{morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
+    _Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
+	fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
+	_Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
+  moredelim=**[is][\color{red}]{`}{`},
 }%
 
@@ -176,4 +197,8 @@
 showstringspaces=false,
 showlines=true,
+aboveskip=6pt,
+belowskip=4pt,
+literate={\\`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}1, % escape \`, otherwise used to highlight in red
+%extendedchars=true,
 }%
 
@@ -181,9 +206,12 @@
 % replace/adjust listings characters that look bad in sanserif
 \lst@CCPutMacro
-\lst@ProcessOther{"2D}{\lst@ttfamily{-{}}{{\ttfamily\upshape -}}} % replace minus
+\lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote
+\lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote
+\lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus
 \lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
 \lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
 \lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
-\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
+\lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
+\lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote
 \lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
 %\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
@@ -366,9 +394,15 @@
 
 The command \lstinline@cfa@ is used to compile \CFA program(s).
-This command works like the GNU \lstinline@gcc@ command, e.g.:
+This command works like the GNU \lstinline@gcc@\index{gcc} command, e.g.:
 \begin{lstlisting}
 cfa [ gcc-options ] C/@{\CFA}@-files [ assembler/loader-files ]
 \end{lstlisting}
-The following additional option is available:
+By default, \CFA programs having the following \lstinline@gcc@ flags turned on:
+\begin{description}
+\item
+\hspace*{-4pt}\lstinline@-std=gnu99@
+The 1999 C standard plus GNU extensions.
+\end{description}
+The following new \CFA option is available:
 \begin{description}
 \item
@@ -382,5 +416,5 @@
 Numeric constants are extended to allow \Index{underscore}s within constants\index{constant!underscore}, e.g.:
 \begin{lstlisting}
-2_147_483_648;				// decimal constant
+2`_`147`_`483`_`648;				// decimal constant
 56_ul;						// decimal unsigned long constant
 0_377;						// octal constant
@@ -451,5 +485,5 @@
 \multicolumn{1}{c@{\hspace{30pt}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
 \begin{lstlisting}
-* int x, y;
+`* int x, y;`
 \end{lstlisting}
 &
@@ -571,5 +605,5 @@
 The point of the new syntax is to allow returning multiple values from a routine~\cite{CLU,Galletly96}, e.g.:
 \begin{lstlisting}
-[ int o1, int o2, char o3 ] f( int i1, char i2, char i3 ) {
+`[ int o1, int o2, char o3 ]` f( int i1, char i2, char i3 ) {
 	@\emph{routine body}@
 }
@@ -639,7 +673,7 @@
 Because the value in the return variable is automatically returned when a \CFA routine terminates, the \lstinline@return@ statement \emph{does not} contain an expression, as in:
 \begin{lstlisting}
-[ int x ] f() {
+`[ int x ]` f() {
 	... x = 0; ... x = y; ...
-	return; // implicitly return x
+	`return;` // implicitly return x
 }
 \end{lstlisting}
@@ -697,5 +731,5 @@
 for example, the following is incorrect:
 \begin{lstlisting}
-* [ int x ] f () fp;		// routine name ``f'' is not allowed
+* [ int x ] f () fp;		// routine name "f" is not allowed
 \end{lstlisting}
 
@@ -864,5 +898,5 @@
 \subsection{Type Nesting}
 
-C allows \Index{type nesting}, but the nested types are hoisted\index{type!hoisting} (refactored) into the enclosing scope.
+\CFA allows \Index{type nesting}, and type qualification of the nested types, where as C hoists\index{type!hoisting} (refactors) nested types into the enclosing scope and has no type qualification.
 \begin{quote2}
 \begin{tabular}{@{}l@{\hspace{30pt}}l|l@{}}
@@ -919,16 +953,14 @@
 
 int fred() {
-	s.t.c = S.R;
-	struct S.T t = { S.R, 1, 2 };
-	enum S.C c;
-	union S.T.U u;
+	s.t.c = `S.`R;	// type qualification
+	struct `S.`T t = { `S.`R, 1, 2 };
+	enum `S.`C c;
+	union `S.T.`U u;
 }
 \end{lstlisting}
 \end{tabular}
 \end{quote2}
-
-\CFA is C \emph{incompatible} on this issue, and provides semantics similar to \CC.
-Nested types are not hoisted and can be referenced using the field selection operator ``\lstinline@.@'', unlike the \CC scope-resolution operator ``\lstinline@::@''.
-Given that nested types in C are equivalent to not using them, i.e., they are essentially useless, it is unlikely there are any realistic usages that break because of this incompatibility.
+In the left example in C, types \lstinline@C@, \lstinline@U@ and \lstinline@T@ are implicitly hoisted outside of type \lstinline@S@ into the containing block scope.
+In the right example in \CFA, the types are not hoisted and accessed using the field-selection operator ``\lstinline@.@'' for type qualification, as does Java, rather than the \CC type-selection operator ``\lstinline@::@''.
 
 
@@ -944,12 +976,33 @@
 \begin{lstlisting}
 const unsigned int size = 10;
-int a[size];
-
-qsort( a, size );		// ascending order using built in ?<?
-{						// descending order by local redefinition
-	int ?<?( int a, int b ) { return a > b; } // nested routine
-	qsort( a, size );
-}
-\end{lstlisting}
+int ia[size];
+...						// assign values to array ia
+qsort( ia, size );		// sort ascending order using builtin ?<?
+{
+	`int ?<?( int x, int y ) { return x > y; }` // nested routine
+	qsort( ia, size );	// sort descending order by local redefinition
+}
+\end{lstlisting}
+
+Nested routines are not first-class, meaning a nested routine cannot be returned if it has references to variables in its enclosing blocks;
+the only exception is references to the external block of the translation unit, as these variables persist for the duration of the program.
+The following program in undefined in \CFA (and \lstinline@gcc@\index{gcc})
+\begin{lstlisting}
+[* [int]( int )] foo() {		// int (*foo())( int )
+	int `i` = 7;
+	int bar( int p ) {
+		`i` += 1;					// dependent on local variable
+		sout | `i` | endl;
+	}
+	return bar;					// undefined because of local dependence
+}
+int main() {
+	* [int](int) fp = foo();	// int (*fp)(int)
+    sout | fp( 3 ) | endl;
+}
+\end{lstlisting}
+because 
+
+Currently, there are no \Index{lambda} expressions, i.e., unnamed routines because routine names are very important to properly select the correct routine.
 
 
@@ -1013,11 +1066,15 @@
 
 \item
-Change: A struct is a scope in C++, not in C
-Rationale: Class scope is crucial to C++, and a struct is a class.
-Effect on original feature: Change to semantics of well-defined feature.
-Difficulty of converting: Semantic transformation.
-How widely used: C programs use struct extremely frequently, but the change is only noticeable when
-struct, enumeration, or enumerator names are referred to outside the struct. The latter is probably
-rare.
+Change: A struct is a scope in C++, not in C \\
+Rationale: Class scope is crucial to C++, and a struct is a class. \\
+Effect on original feature: Change to semantics of well-defined feature. \\
+Difficulty of converting: Semantic transformation. \\
+How widely used: C programs use struct extremely frequently, but the change is only noticeable when struct, enumeration, or enumerator names are referred to outside the struct.
+The latter is probably rare.
+
+\CFA is C \emph{incompatible} on this issue, and provides semantics similar to \CC.
+Nested types are not hoisted and can be referenced using the field selection operator ``\lstinline@.@'', unlike the \CC scope-resolution operator ``\lstinline@::@''.
+Given that nested types in C are equivalent to not using them, i.e., they are essentially useless, it is unlikely there are any realistic usages that break because of this incompatibility.
+
 
 \item
@@ -1185,5 +1242,5 @@
 First the right-hand tuple is flattened and then the values are assigned individually.
 Flattening is also performed on tuple types.
-For example, the type \lstinline@[ int, [ int, int ], int ]@ can be coerced, using flattening, into the type lstinline@[ int, int, int, int ]@.
+For example, the type \lstinline@[ int, [ int, int ], int ]@ can be coerced, using flattening, into the type \lstinline@[ int, int, int, int ]@.
 
 A \newterm{structuring coercion} is the opposite of flattening;
@@ -1352,10 +1409,10 @@
 \multicolumn{1}{c@{\hspace{30pt}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
 \begin{lstlisting}
-L1: for ( ... ) {
-	L2: for ( ... ) {
-		L3: for ( ... ) {
-			... break L1; ...
-			... break L2; ...
-			... break L3; // or break
+`L1:` for ( ... ) {
+	`L2:` for ( ... ) {
+		`L3:` for ( ... ) {
+			... break `L1`; ...
+			... break `L2`; ...
+			... break `L3`; // or break
 		}
 	}
@@ -1382,10 +1439,10 @@
 \multicolumn{1}{c@{\hspace{30pt}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
 \begin{lstlisting}
-L1: for ( ... ) {
-	L2: for ( ... ) {
-		L3: for ( ... ) {
-			... continue L1; ...
-			... continue L2; ...
-			... continue L3; ...
+`L1`: for ( ... ) {
+	`L2`: for ( ... ) {
+		`L3`: for ( ... ) {
+			... continue `L1`; ...
+			... continue `L2`; ...
+			... continue `L3`; ...
 
 		}
@@ -1623,7 +1680,7 @@
 \begin{lstlisting}
 switch ( i ) {
-  case 1, 3, 5:
+  `case 1, 3, 5`:
 	...
-  case 2, 4, 6:
+  `case 2, 4, 6`:
 	...
 }
@@ -1634,5 +1691,5 @@
   case 1: case 3 : case 5:
 	...
-  case 2: case 4 : case 6: /* even values */
+  case 2: case 4 : case 6:
 	...
 }
@@ -1655,7 +1712,7 @@
 \begin{lstlisting}
 switch ( i ) {
-  case 1~5
+  `case 1~5:`
 	...
-  case 10~15
+  `case 10~15:`
 	...
 }
@@ -1672,4 +1729,5 @@
 &
 \begin{lstlisting}
+
 // 1, 2, 3, 4, 5
 
@@ -2168,5 +2226,67 @@
 
 
-\section{Generics }
+\section{Auto Type-Inferencing}
+
+Auto type-inferencing occurs in a declaration where a variable's type is inferred from its initialization expression type.
+\begin{quote2}
+\begin{tabular}{@{}l@{\hspace{30pt}}ll@{}}
+\multicolumn{1}{c@{\hspace{30pt}}}{\textbf{\CC}}	& \multicolumn{1}{c}{\lstinline@gcc@}\index{gcc} \\
+\begin{lstlisting}
+
+auto j = 3.0 * 4;
+int i;
+auto k = i;
+\end{lstlisting}
+&
+\begin{lstlisting}
+#define expr 3.0 * i
+typeof(expr) j = expr;
+int i;
+typeof(i) k = i;
+\end{lstlisting}
+&
+\begin{lstlisting}
+
+// use type of initialization expression
+
+// use type of primary variable
+\end{lstlisting}
+\end{tabular}
+\end{quote2}
+The two important capabilities are:
+\begin{itemize}
+\item
+preventing having to determine or write out long generic types,
+\item
+ensure secondary variables, related to a primary variable, always have the same type.
+\end{itemize}
+
+In \CFA, \lstinline@typedef@ provides a mechanism to alias long type names with short ones, both globally and locally, but not eliminate the use of the short name.
+\lstinline@gcc@ provides \lstinline@typeof@ to declare a secondary variable from a primary variable.
+\CFA also relies heavily on the specification of the left-hand side of assignment for type inferencing, so in many cases it is crucial to specify the type of the left-hand side to select the correct type of the right-hand expression.
+Only for overloaded routines with the same return type is variable type-inferencing possible.
+Finally, \lstinline@auto@ presents the programming problem of tracking down a type when the type is actually needed.
+For example, given
+\begin{lstlisting}
+auto j = `...`
+\end{lstlisting}
+and the need to write a routine to compute using \lstinline@j@
+\begin{lstlisting}
+void rtn( `...` parm );
+rtn( j );
+\end{lstlisting}
+A programmer must work backwards to determine the type of \lstinline@j@'s initialization expression, reconstructing the possibly long generic type-name.
+In this situation, having the type name or a short alias is very useful.
+
+There is also the conundrum in type inferencing of when to \emph{\Index{brand}} a type.
+That is, when is the type of the variable more important than the type of its initialization expression.
+For example, if a change is made in an initialization expression, it can cause hundreds or thousands of cascading type changes and/or errors.
+At some point, a programmer wants the type of the variable to remain constant and the expression to be in error when it changes.
+
+Given \lstinline@typedef@ and \lstinline@typeof@ in \CFA, and the strong need to use the type of left-hand side in inferencing, auto type-inferencing is not supported at this time.
+Should a significant need arise, this feature can be revisited.
+
+
+\section{Generics}
 
 \CFA supports parametric polymorphism to allow users to define generic functions and types.
@@ -2457,199 +2577,48 @@
 
 
-\section{I/O Library}
-\label{s:IOLibrary}
-
-The goal for \CFA I/O is to make I/O as simple as possible for the general case, while fully supporting polmorphism and user defined types in a consistent way.
-The general case is printing out a sequence of variables separated by whitespace.
-\begin{lstlisting}
-int x = 0, y = 1, z = 2;
-sout | x | y | z | endl;
-
-cout << x << " " << y << " " << z << endl;
-\end{lstlisting}
-The \CC form takes almost twice as many characters.
-
-The logical-or operator is used because it is the lowest priority overloadable operator, other than assignment.
-Therefore, most output expressions do not require parenthesis.
-\begin{lstlisting}
-int x = 0, y = 1, z = 2;
-sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;
-
-cout << x * 3 << y + 1 << (z << 2) << (x == y) << (x | y) << (x || y) << (x > z ? 1 : 2) << endl;
-\end{lstlisting}
-
-Finally, the logical-or operator has a link with the Shell pipe-operator for moving data, although data flows in the opposite direction.
-
-\begin{figure}
-\begin{lstlisting}[mathescape=off]
-#include <fstream>
-
-int main() {
-	char c;
-	short int si;
-	unsigned short int usi;
-	int i;
-	unsigned int ui;
-	long int li;
-	unsigned long int uli;
-	long long int lli;
-	unsigned long long int ulli;
-	float f;
-	double d;
-	long double ld;
-	float _Complex fc;
-	double _Complex dc;
-	long double _Complex ldc;
-	char s1[10], s2[10];
-
-	ifstream in;
-	open( &in, "read.data", "r" );
-
-	&in | &c
-		| &si | &usi | &i | &ui | &li | &uli | &lli | &ulli
-		| &f | &d | &ld
-		| &fc | &dc | &ldc
-		| str( s1 ) | str( s2, 10 );
-
-	sout | c | ' ' | endl
-		 | si | usi | i | ui | li | uli | lli | ulli | endl
-		 | f | d | ld | endl
-		 | f | "" | d | "" | ld | endl;
-
-	sepSet( sout, ", $" );
-	sout | fc | dc | ldc | endl
-		 | sepOn | s1 | sepOff | s2 | endl
-		 | s1 | "" | s2 | endl;
-}
-
-$ cat read.data 
-A 1 2 3 4 5 6 7 8 1.1 1.2 1.3 1.1+2.3 1.1-2.3 1.1-2.3 abc xyz
-$ a.out
-A 
-1 2 3 4 5 6 7 8
-1.1 1.2 1.3
-1.11.21.3
-1.1+2.3i, $1.1-2.3i, $1.1-2.3i
-, $abcxyz
-abcxyz
-\end{lstlisting}
-\end{figure}
-
-
-\section{Standard Library}
-\label{s:StandardLibrary}
-
-The goal of the \CFA standard-library is to wrap many of the existing C library-routines that are explicitly polymorphic into implicitly polymorphic versions.
-
-
-\subsection{malloc}
-
-\begin{lstlisting}
-forall( otype T ) T * malloc( void );
-forall( otype T ) T * malloc( char fill );
-forall( otype T ) T * malloc( T * ptr, size_t size );
-forall( otype T ) T * malloc( T * ptr, size_t size, unsigned char fill );
-forall( otype T ) T * calloc( size_t size );
-forall( otype T ) T * realloc( T * ptr, size_t size );
-forall( otype T ) T * realloc( T * ptr, size_t size, unsigned char fill );
-
-forall( otype T ) T * aligned_alloc( size_t alignment );
-forall( otype T ) T * memalign( size_t alignment );		// deprecated
-forall( otype T ) int posix_memalign( T ** ptr, size_t alignment );
-
-forall( otype T ) T * memset( T * ptr, unsigned char fill ); // use default value '\0' for fill
-forall( otype T ) T * memset( T * ptr );				// remove when default value available
-\end{lstlisting}
-
-
-\subsection{ato/strto}
-
-\begin{lstlisting}
-int ato( const char * ptr );
-unsigned int ato( const char * ptr );
-long int ato( const char * ptr );
-unsigned long int ato( const char * ptr );
-long long int ato( const char * ptr );
-unsigned long long int ato( const char * ptr );
-float ato( const char * ptr );
-double ato( const char * ptr );
-long double ato( const char * ptr );
-float _Complex ato( const char * ptr );
-double _Complex ato( const char * ptr );
-long double _Complex ato( const char * ptr );
-
-int strto( const char * sptr, char ** eptr, int base );
-unsigned int strto( const char * sptr, char ** eptr, int base );
-long int strto( const char * sptr, char ** eptr, int base );
-unsigned long int strto( const char * sptr, char ** eptr, int base );
-long long int strto( const char * sptr, char ** eptr, int base );
-unsigned long long int strto( const char * sptr, char ** eptr, int base );
-float strto( const char * sptr, char ** eptr );
-double strto( const char * sptr, char ** eptr );
-long double strto( const char * sptr, char ** eptr );
-float _Complex strto( const char * sptr, char ** eptr );
-double _Complex strto( const char * sptr, char ** eptr );
-long double _Complex strto( const char * sptr, char ** eptr );
-\end{lstlisting}
-
-
-\subsection{bsearch/qsort}
-
-\begin{lstlisting}
-forall( otype T | { int ?<?( T, T ); } )
-T * bsearch( const T key, const T * arr, size_t dimension );
-
-forall( otype T | { int ?<?( T, T ); } )
-void qsort( const T * arr, size_t dimension );
-\end{lstlisting}
-
-
-\subsection{abs}
-
-\begin{lstlisting}
-char abs( char );
-extern "C" {
-int abs( int );		// use default C routine for int
-} // extern
-long int abs( long int );
-long long int abs( long long int );
-float abs( float );
-double abs( double );
-long double abs( long double );
-float _Complex abs( float _Complex );
-double _Complex abs( double _Complex );
-long double _Complex abs( long double _Complex );
-\end{lstlisting}
-
-
-\subsection{random}
-
-\begin{lstlisting}
-void randseed( long int s );
-char random();
-int random();
-unsigned int random();
-long int random();
-unsigned long int random();
-float random();
-double random();
-float _Complex random();
-double _Complex random();
-long double _Complex random();
-\end{lstlisting}
-
-
-\subsection{min/max/swap}
-
-\begin{lstlisting}
-forall( otype T | { int ?<?( T, T ); } )
-T min( const T t1, const T t2 );
-
-forall( otype T | { int ?>?( T, T ); } )
-T max( const T t1, const T t2 );
-
-forall( otype T )
-void swap( T * t1, T * t2 );
-\end{lstlisting}
+\section{Syntactic Anomalies}
+
+The number 0 and 1 are treated specially in \CFA, and can be redefined as variables.
+One syntactic anomaly is when a field in an structure is names 0 or 1:
+\begin{lstlisting}
+struct S {
+	int 0, 1;
+} s;
+\end{lstlisting}
+The problem occurs in accesing these fields using the selection operation ``\lstinline@.@'':
+\begin{lstlisting}
+s.0 = 0;	// ambiguity with floating constant .0
+s.1 = 1;	// ambiguity with floating constant .1
+\end{lstlisting}
+To make this work, a space is required after the field selection:
+\begin{lstlisting}
+`s.@\textvisiblespace@0` = 0;
+`s.@\textvisiblespace@1` = 1;
+\end{lstlisting}
+While this sytact is awkward, it is unlikely many programers will name fields of a structure 0 or 1.
+Like the \CC lexical problem with closing template-syntax, e.g, \lstinline@Foo<Bar<int`>>`@, this issue can be solved with a more powerful lexer/parser.
+
+There are several ambiguous cases with operator identifiers, e.g., \lstinline@int *?*?()@, where the string \lstinline@*?*?@ can be lexed as \lstinline@*@/\lstinline@?*?@ or \lstinline@*?@/\lstinline@*?@.
+Since it is common practise to put a unary operator juxtaposed to an identifier, e.g., \lstinline@*i@, users will be annoyed if they cannot do this with respect to operator identifiers.
+Even with this special hack, there are 5 general cases that cannot be handled.
+The first case is for the function-call identifier \lstinline@?()@:
+\begin{lstlisting}
+int *@\textvisiblespace@?()();	// declaration: space required after '*'
+*@\textvisiblespace@?()();		// expression: space required after '*'
+\end{lstlisting}
+Without the space, the string \lstinline@*?()@ is ambiguous without N character look ahead;
+it requires scanning ahead to determine if there is a \lstinline@'('@, which is the start of an argument/parameter list.
+
+The 4 remaining cases occur in expressions:
+\begin{lstlisting}
+i++@\textvisiblespace@?i:0;		// space required before '?'
+i--@\textvisiblespace@?i:0;		// space required before '?'
+i@\textvisiblespace@?++i:0;		// space required after '?'
+i@\textvisiblespace@?--i:0;		// space required after '?'
+\end{lstlisting}
+In the first two cases, the string \lstinline@i++?@ is ambiguous, where this string can be lexed as \lstinline@i@ / \lstinline@++?@ or \lstinline@i++@ / \lstinline@?@;
+it requires scanning ahead to determine if there is a \lstinline@'('@, which is the start of an argument list.
+In the second two cases, the string \lstinline@?++x@ is ambiguous, where this string can be lexed as \lstinline@?++@ / \lstinline@x@ or \lstinline@?@ / y\lstinline@++x@;
+it requires scanning ahead to determine if there is a \lstinline@'('@, which is the start of an argument list.
 
 
@@ -2676,4 +2645,5 @@
 
 task creates a type with implicit locking, separate stack, and a thread
+
 
 \subsection{Monitors}
@@ -3775,5 +3745,5 @@
 \multicolumn{1}{c|}{\textbf{\CFA/\CC}} & \multicolumn{1}{c|}{\textbf{Go}} & \multicolumn{1}{c}{\textbf{Rust}}	\\
 \hline
-\begin{lstlisting}
+\begin{lstlisting}[boxpos=t]
 extern "C" {
 #include <sys/types.h>
@@ -3782,5 +3752,5 @@
 }
 size_t fileSize( const char *path ) {
-	stat s;
+	struct stat s;
 	stat(path, &s);
 	return s.st_size;
@@ -3788,5 +3758,5 @@
 \end{lstlisting}
 &
-\begin{lstlisting}
+\begin{lstlisting}[boxpos=t]
 /*
 #cgo
@@ -3807,8 +3777,6 @@
 \end{lstlisting}
 &
-\begin{lstlisting}
+\begin{lstlisting}[boxpos=t]
 use libc::{c_int, size_t};
-
-// The following declarations are
 // translated from sys/stat.h
 #[repr(C)]
@@ -3818,5 +3786,4 @@
 	...
 }
-
 #[link(name = "libc")]
 extern {
@@ -3824,11 +3791,10 @@
 	buf: *mut stat_t) -> c_int;
 }
-
 fn fileSize(path: *const u8) -> size_t
 {
 	unsafe {
-	let mut buf: stat_t = uninit();
-	stat(path, &mut buf);
-	buf.st_size
+		let mut buf: stat_t = uninit();
+		stat(path, &mut buf);
+		buf.st_size
 	}
 }
@@ -3953,4 +3919,5 @@
 
 
+\begin{comment}
 \subsubsection{Modules/Packages}
 
@@ -4032,4 +3999,6 @@
 }
 \end{lstlisting}
+\end{comment}
+
 
 \subsubsection{Parallel Tasks}
@@ -4187,4 +4156,7 @@
 \end{flushleft}
 
+\lstset{basicstyle=\sf\relsize{-1}}
+
+
 \subsection{Summary of Language Comparison}
 
@@ -4253,4 +4225,350 @@
 D does not have any built-in concurrency constructs in the
 language, though it does have a standard library for concurrency which includes the low-level primitives for concurrency.
+
+
+\appendix
+
+
+\section{I/O Library}
+\label{s:IOLibrary}
+\index{input/output library}
+
+The goal for \CFA I/O is to make I/O as simple as possible for the general case, while fully supporting polmorphism and user defined types in a consistent way.
+The general case is printing out a sequence of variables separated by whitespace.
+\begin{quote2}
+\begin{tabular}{@{}l@{\hspace{30pt}}l@{}}
+\multicolumn{1}{c@{\hspace{30pt}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{\CC}}	\\
+\begin{lstlisting}
+int x = 0, y = 1, z = 2;
+`sout` `|` x `|` y `|` z `| endl`;
+\end{lstlisting}
+&
+\begin{lstlisting}
+
+cout << x << " " << y << " " << z << endl;
+\end{lstlisting}
+\end{tabular}
+\end{quote2}
+The \CFA form is half as many characters, and is similar to Python I/O with respect to implicit separators.
+
+The logical-or operator is used because it is the lowest-priority overloadable operator, other than assignment.
+Therefore, fewer output expressions require parenthesis.
+\begin{quote2}
+\begin{tabular}{@{}ll@{}}
+\textbf{\CFA:}
+&
+\begin{lstlisting}
+sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;
+\end{lstlisting}
+\\
+\textbf{\CC:}
+&
+\begin{lstlisting}
+cout << x * 3 << y + 1 << (z << 2) << (x == y) << (x | y) << (x || y) << (x > z ? 1 : 2) << endl;
+\end{lstlisting}
+\end{tabular}
+\end{quote2}
+Finally, the logical-or operator has a link with the Shell pipe-operator for moving data, although data flows in the opposite direction.
+
+The implicit seperator\index{I/O separator} character (space/blank) is a separator not a terminator.
+The rules for implicitly adding the separator are:
+\begin{enumerate}
+\item
+A seperator does not appear at the start or end of a line.
+\begin{lstlisting}[belowskip=0pt]
+sout 1 | 2 | 3 | endl;
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+1 2 3
+\end{lstlisting}
+\item
+A seperator does not appear before or after a character literal or variable.
+\begin{lstlisting}
+sout | '1' | '2' | '3' | endl;
+123
+\end{lstlisting}
+\item
+A seperator does not appear before or after a null (empty) C string
+\begin{lstlisting}
+sout | 1 | "" | 2 | "" | 3 | endl;
+123
+\end{lstlisting}
+which is a local mechanism to disable insertion of the separator character.
+\item
+A seperator does not appear before a C string starting with the \Index{extended ASCII}\index{ASCII} characters: \lstinline[mathescape=off]@([{$£¥¿«@
+%$
+\begin{lstlisting}[mathescape=off]
+sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x $" | 4 | "x £" | 5 | "x ¥" | 6 | "x ¿" | 7 | "x «" | 8 | endl;
+\end{lstlisting}
+%$
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+x (1 x [2 x {3 x $4 x £5 x ¥6 x ¿7 x «8
+\end{lstlisting}
+%$
+\item
+A seperator does not appear after a C string ending with the extended ASCII characters: \lstinline@,.:;!?)]}%¢»@
+\begin{lstlisting}[belowskip=0pt]
+sout | 1 | ", x" | 2 | ". x" | 3 | ": x" | 4 | "; x" | 5 | "! x" | 6 | "? x" | 7 | ") x" | 8 | "] x" | 9 | "} x"
+	 | 10 | "% x" | 11 | L"¢ x" | 12 | L"» x" | endl;
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+1, x 2. x 3: x 4; x 5! x 6? x 7) x 8] x 9} x 10% x 11¢ 12»
+\end{lstlisting}
+\item
+A seperator does not appear before or after a C string begining/ending with the characters: \lstinline@\f\n\r\t\v\`'"@
+\begin{lstlisting}[belowskip=0pt]
+sout | "x '" | 1 | "' x \`" | 2 | "\` x \"" | 3 | "\" x" | endl;
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+x '1' x \`2\` x "3" x
+\end{lstlisting}
+\begin{lstlisting}[showtabs=true,aboveskip=0pt]
+sout | "x\t" | 1 | "\tx" | endl;
+x	1	x
+\end{lstlisting}
+\end{enumerate}
+The following \CC-style \Index{manipulator}s allow further control over implicit seperation.
+\begin{lstlisting}[mathescape=off,belowskip=0pt]
+sout | sepOn | 1 | 2 | 3 | sepOn | endl;	// separator at start of line
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+ 1 2 3
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
+sout | 1 | sepOff | 2 | 3 | endl;			// turn off implicit separator temporarily
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+12 3
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
+sout | sepDisable | 1 | 2 | 3 | endl;		// turn off implicit separation, affects all subsequent prints
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+123
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
+sout | 1 | sepOn | 2 | 3 | endl;			// turn on implicit separator temporarily
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+1 23
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
+sout | sepEnable | 1 | 2 | 3 | endl;		// turn on implicit separation, affects all subsequent prints
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
+1 2 3
+\end{lstlisting}
+\begin{lstlisting}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt]
+sepSet( sout, ", $" );						// change separator from " " to ", $"
+sout | 1 | 2 | 3 | endl;
+\end{lstlisting}
+%$
+\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt]
+1, $2, $3
+\end{lstlisting}
+%$
+\VRef[Figure]{f:ExampleIO} shows an example of input and output I/O in \CFA.
+
+\begin{figure}
+\begin{lstlisting}[mathescape=off]
+#include <fstream>
+
+int main() {
+	char c;														// basic types
+	short int si;
+	unsigned short int usi;
+	int i;
+	unsigned int ui;
+	long int li;
+	unsigned long int uli;
+	long long int lli;
+	unsigned long long int ulli;
+	float f;
+	double d;
+	long double ld;
+	float _Complex fc;
+	double _Complex dc;
+	long double _Complex ldc;
+	char s1[10], s2[10];
+
+	ifstream in;												// create / open file
+	open( &in, "input.data", "r" );
+
+	&in | &c													// character
+		| &si | &usi | &i | &ui | &li | &uli | &lli | &ulli		// integral
+		| &f | &d | &ld											// floating point
+		| &fc | &dc | &ldc										// floating-point complex
+		| cstr( s1 ) | cstr( s2, 10 );							// C string, length unchecked and checked
+
+	sout | c | ' ' | endl										// character
+		 | si | usi | i | ui | li | uli | lli | ulli | endl		// integral
+		 | f | d | ld | endl									// floating point
+		 | fc | dc | ldc | endl;								// complex
+	sout | endl;
+	sout | f | "" | d | "" | ld | endl							// floating point without separator
+		 | sepDisable | fc | dc | ldc | sepEnable | endl		// complex without separator
+		 | sepOn | s1 | sepOff | s2 | endl						// local separator removal
+		 | s1 | "" | s2 | endl;									// C string withou separator
+	sout | endl;
+	sepSet( sout, ", $" );										// change separator, maximum of 15 characters
+	sout | f | d | ld | endl									// floating point without separator
+		 | fc | dc | ldc | endl									// complex without separator
+		 | s1 | s2 | endl;
+}
+
+$ cat input.data 
+A 1 2 3 4 5 6 7 8 1.1 1.2 1.3 1.1+2.3 1.1-2.3 1.1-2.3 abc xyz
+$ a.out
+A 
+1 2 3 4 5 6 7 8
+1.1 1.2 1.3
+1.1+2.3i 1.1-2.3i 1.1-2.3i
+
+1.11.21.3
+1.1+2.3i1.1-2.3i1.1-2.3i
+ abcxyz
+abcxyz
+
+1.1, $1.2, $1.3
+1.1+2.3i, $1.1-2.3i, $1.1-2.3i
+abc, $xyz
+\end{lstlisting}
+\caption{Example I/O}
+\label{f:ExampleIO}
+\end{figure}
+
+
+\section{Standard Library}
+\label{s:StandardLibrary}
+
+The goal of the \CFA standard-library is to wrap many of the existing C library-routines that are explicitly polymorphic into implicitly polymorphic versions.
+
+
+\subsection{malloc}
+
+\begin{lstlisting}
+forall( otype T ) T * malloc( void );
+forall( otype T ) T * malloc( char fill );
+forall( otype T ) T * malloc( T * ptr, size_t size );
+forall( otype T ) T * malloc( T * ptr, size_t size, unsigned char fill );
+forall( otype T ) T * calloc( size_t size );
+forall( otype T ) T * realloc( T * ptr, size_t size );
+forall( otype T ) T * realloc( T * ptr, size_t size, unsigned char fill );
+
+forall( otype T ) T * aligned_alloc( size_t alignment );
+forall( otype T ) T * memalign( size_t alignment );		// deprecated
+forall( otype T ) int posix_memalign( T ** ptr, size_t alignment );
+
+forall( otype T ) T * memset( T * ptr, unsigned char fill ); // use default value '\0' for fill
+forall( otype T ) T * memset( T * ptr );				// remove when default value available
+\end{lstlisting}
+
+
+\subsection{ato/strto}
+
+\begin{lstlisting}
+int ato( const char * ptr );
+unsigned int ato( const char * ptr );
+long int ato( const char * ptr );
+unsigned long int ato( const char * ptr );
+long long int ato( const char * ptr );
+unsigned long long int ato( const char * ptr );
+float ato( const char * ptr );
+double ato( const char * ptr );
+long double ato( const char * ptr );
+float _Complex ato( const char * ptr );
+double _Complex ato( const char * ptr );
+long double _Complex ato( const char * ptr );
+
+int strto( const char * sptr, char ** eptr, int base );
+unsigned int strto( const char * sptr, char ** eptr, int base );
+long int strto( const char * sptr, char ** eptr, int base );
+unsigned long int strto( const char * sptr, char ** eptr, int base );
+long long int strto( const char * sptr, char ** eptr, int base );
+unsigned long long int strto( const char * sptr, char ** eptr, int base );
+float strto( const char * sptr, char ** eptr );
+double strto( const char * sptr, char ** eptr );
+long double strto( const char * sptr, char ** eptr );
+float _Complex strto( const char * sptr, char ** eptr );
+double _Complex strto( const char * sptr, char ** eptr );
+long double _Complex strto( const char * sptr, char ** eptr );
+\end{lstlisting}
+
+
+\subsection{bsearch/qsort}
+
+\begin{lstlisting}
+forall( otype T | { int ?<?( T, T ); } )
+T * bsearch( const T key, const T * arr, size_t dimension );
+
+forall( otype T | { int ?<?( T, T ); } )
+void qsort( const T * arr, size_t dimension );
+\end{lstlisting}
+
+
+\subsection{abs}
+
+\begin{lstlisting}
+char abs( char );
+extern "C" {
+int abs( int );				// use default C routine for int
+} // extern "C"
+long int abs( long int );
+long long int abs( long long int );
+float abs( float );
+double abs( double );
+long double abs( long double );
+float _Complex abs( float _Complex );
+double _Complex abs( double _Complex );
+long double _Complex abs( long double _Complex );
+\end{lstlisting}
+
+
+\subsection{floor/ceil}
+
+\begin{lstlisting}
+float floor( float );
+extern "C" {
+double floor( double );		// use C routine for double
+} // extern "C"
+long double floor( long double );
+
+float ceil( float );
+extern "C" {
+double ceil( double );		// use C routine for double
+} // extern "C"
+long double ceil( long double );
+\end{lstlisting}
+
+
+\subsection{random}
+
+\begin{lstlisting}
+void rand48seed( long int s );
+char rand48();
+int rand48();
+unsigned int rand48();
+long int rand48();
+unsigned long int rand48();
+float rand48();
+double rand48();
+float _Complex rand48();
+double _Complex rand48();
+long double _Complex rand48();
+\end{lstlisting}
+
+
+\subsection{min/max/swap}
+
+\begin{lstlisting}
+forall( otype T | { int ?<?( T, T ); } )
+T min( const T t1, const T t2 );
+
+forall( otype T | { int ?>?( T, T ); } )
+T max( const T t1, const T t2 );
+
+forall( otype T )
+void swap( T * t1, T * t2 );
+\end{lstlisting}
 
 
