Changeset 62a38e7
- Timestamp:
- Jun 28, 2024, 6:12:51 PM (3 months ago)
- Branches:
- master
- Children:
- bc07190
- Parents:
- d96d4f0
- Location:
- doc/theses/jiada_liang_MMath
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/CFAenum.tex
rd96d4f0 r62a38e7 429 429 @choose( rp )@ { $\C{// implicit breaks}$ 430 430 case MERCURY, VENUS, EARTH, MARS: 431 sout | @ label( rp )@ | "is a rocky planet";431 sout | @rp@ | "is a rocky planet"; 432 432 case JUPITER, SATURN, URANUS, NEPTUNE: 433 sout | label( rp )| "is a gas-giant planet";433 sout | rp | "is a gas-giant planet"; 434 434 default: 435 sout | label( rp )| "is not a planet";435 sout | rp | "is not a planet"; 436 436 } 437 437 for ( @p; Planet@ ) { $\C{// enumerate}$ 438 sout | "Your weight on" | ( @p == MOON@ ? "the" : " " ) | label( p )438 sout | "Your weight on" | ( @p == MOON@ ? "the" : " " ) | p 439 439 | "is" | wd( 1,1, surfaceWeight( p, earthMass ) ) | "kg"; 440 440 } -
doc/theses/jiada_liang_MMath/test2.cfa
rd96d4f0 r62a38e7 37 37 choose( rp ) { // implicit breaks 38 38 case MERCURY, VENUS, EARTH, MARS: 39 sout | label( rp )| "is a rocky planet";39 sout | rp | "is a rocky planet"; 40 40 case JUPITER, SATURN, URANUS, NEPTUNE: 41 sout | label( rp )| "is a gas-giant planet";41 sout | rp | "is a gas-giant planet"; 42 42 default: 43 sout | label( rp )| "is not a planet";43 sout | rp | "is not a planet"; 44 44 } 45 45 46 46 for ( p; Planet ) { // enumerate 47 sout | "Your weight on" | ( p == MOON ? "the" : " " ) | label( p )47 sout | "Your weight on" | ( p == MOON ? "the" : " " ) | p 48 48 | "is" | wd( 1,1, surfaceWeight( p, earthMass ) ) | "kg"; 49 49 } 50 50 51 }
Note: See TracChangeset
for help on using the changeset viewer.