Index: doc/theses/jiada_liang_MMath/CFAenum.tex
===================================================================
--- doc/theses/jiada_liang_MMath/CFAenum.tex	(revision 3b693980acdd9998e43ab2d670428143c51a1c7f)
+++ doc/theses/jiada_liang_MMath/CFAenum.tex	(revision 290922138f90a1ce344a426acf7a7105710cc2c2)
@@ -391,10 +391,10 @@
 The unnamed enumeration provides the gravitational-constant enumerator @G@.
 Function @surfaceGravity@ uses the @with@ clause to remove @p@ qualification from fields @mass@ and @radius@.
-The program main uses @SizeE@ to obtain the number of enumerators in @Planet@, and safely converts the random value into a @Planet@ enumerator.
-The resulting random orbital-body is used in a \CFA @choose@ statement.
-The enumerators in the @case@ clause use position for testing.
-The prints use @labelE@ to print an enumerator's label.
-Finally, a loop iterates through the planets computing the weight on each planet for a given earth mass.
-The print statement does an equality comparison with an enumeration variable and enumerator.
+The program main uses the pseudo function @countof@ to obtain the number of enumerators in @Planet@, and safely converts the random value into a @Planet@ enumerator using @fromInt@.
+The resulting random orbital-body is used in a @choose@ statement.
+The enumerators in the @case@ clause use enumerator position for testing.
+The prints use @label@ to print an enumerator's name.
+Finally, a loop enumerates through the planets computing the weight on each planet for a given earth mass.
+The print statement does an equality comparison with an enumeration variable and enumerator (@p == MOON@).
 
 \begin{figure}
@@ -402,10 +402,10 @@
 \begin{cfa}
 struct MR { double mass, radius; };
-enum( @MR@ ) Planet {
+enum( @MR@ ) Planet {						$\C{// typed enumeration}$
 	//                      mass (kg)   radius (km)
 	MERCURY = { 0.330_E24, 2.4397_E6 },
 	VENUS      = { 4.869_E24, 6.0518_E6 },
 	EARTH       = { 5.976_E24, 6.3781_E6 },
-	MOON        = { 7.346_E22, 1.7380_E6 }, $\C{// not a planet}$
+	MOON        = { 7.346_E22, 1.7380_E6 },	$\C{// not a planet}$
 	MARS         = { 0.642_E24, 3.3972_E6 },
 	JUPITER    = { 1898._E24, 71.492_E6 },
@@ -413,8 +413,9 @@
 	URANUS    = { 86.86_E24, 25.559_E6 },
 	NEPTUNE  = { 102.4_E24, 24.746_E6 },
-};
-enum( double ) { G = 6.6743_E-11 }; $\C{// universal gravitational constant (m3 kg-1 s-2)}$
+	PLUTO       = { 1.303_E22, 1.1880_E6 },	$\C{// not a planet}$
+};
+enum( double ) { G = 6.6743_E-11 };			$\C{// universal gravitational constant (m3 kg-1 s-2)}$
 static double surfaceGravity( Planet p ) @with( p )@ {
-	return G * mass / ( radius \ 2 ); $\C{// exponentiation}$
+	return G * mass / ( radius @\@ 2 );		$\C{// no qualification, exponentiation}$
 }
 static double surfaceWeight( Planet p, double otherMass ) {
@@ -422,20 +423,19 @@
 }
 int main( int argc, char * argv[] ) {
-	if ( argc != 2 ) exit | "Usage: " | argv[0] | "earth-weight";
+	if ( argc != 2 ) @exit@ | "Usage: " | argv[0] | "earth-weight";  // terminate program
 	double earthWeight = convert( argv[1] );
 	double earthMass = earthWeight / surfaceGravity( EARTH );
-
-	Planet p = @fromInt@( prng( @SizeE@(Planet) ) ); $\C{// select a random orbiting body}$
-	@choose( p )@ {
+	Planet rp = @fromInt@( prng( @countof@( Planet ) ) ); $\C{// select random orbiting body}$
+	@choose( rp )@ {						$\C{// implicit breaks}$
 	  case MERCURY, VENUS, EARTH, MARS:
-		sout | @labelE( p )@ | "is a rocky planet";
-	  @case JUPITER, SATURN, URANUS, NEPTUNE:@
-		sout | labelE( p ) | "is a gas-giant planet";
+		sout | @label( rp )@ | "is a rocky planet";
+	  case JUPITER, SATURN, URANUS, NEPTUNE:
+		sout | label( rp ) | "is a gas-giant planet";
 	  default:
-		sout | labelE( p ) | "is not a planet";
+		sout | label( rp ) | "is not a planet";
 	}
-	for ( @p; Planet@ ) {
-		sout | "Your weight on" | (@p == MOON@ ? "the" : "") | labelE(p)
-			   | "is" | wd( 1,1, surfaceWeight( p, earthMass ) ) | "kg";
+	for ( @p; Planet@ ) {					$\C{// enumerate}$
+		sout | "Your weight on" | ( @p == MOON@ ? "the" : " " ) | label( p )
+			   | "is" | wd( 1,1,  surfaceWeight( p, earthMass ) ) | "kg";
 	}
 }
@@ -451,4 +451,5 @@
 Your weight on URANUS is 90.5 kg
 Your weight on NEPTUNE is 113.8 kg
+Your weight on PLUTO is 6.3 kg
 \end{cfa}
 \caption{Planet Example}
