Changeset 6abb6dc for doc/theses/jiada_liang_MMath/test.go
- Timestamp:
- Aug 10, 2024, 10:27:26 AM (6 months ago)
- Branches:
- master
- Children:
- 774c97e
- Parents:
- 2ca7fc2 (diff), 5ca5263 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/test.go
r2ca7fc2 r6abb6dc 20 20 21 21 22 const ( R = 0; G = 3; B ) // implicit: 0 0 022 const ( R = 0; G = 3; B = 3; TT = 3 ) // implicit: 0 3 3 23 23 const ( Fred = "Fred"; Mary = "Mary"; Jane = "Jane" ) // Fred Mary Jane 24 24 const ( H = 0; Jack = "Jack"; J; K = 0; I ) // type change, implicit: 0 Jack Jack 25 25 const ( C = iota + G; M = iota; Y ) 26 26 const ( Mon = iota; Tue; Wed; // 0, 1, 2 27 Thu = 10; Fri = iota - Wed + Thu - 1; Sat; Sun = iota) // 10, 11, 12, 1327 Thu = 10; Fri = iota - Wed + Thu - 1; Sat; Sun = 0 ) // 10, 11, 12, 13 28 28 const ( O1 = iota + 1; _; O3; _; O5 ) // 1, 3, 5 29 29 const ( V1 = iota; V2; V3 = 7; V4 = iota + 1; V5 ) … … 34 34 35 35 func main() { 36 fmt.Println( "Go:") 36 37 if 3 == R {}; 37 38 fmt.Println( R, G, B ) … … 45 46 46 47 day := Mon; 48 day = Sun; 49 47 50 switch day { 48 51 case Mon, Tue, Wed, Thu, Fri: 49 52 fmt.Println( "weekday" ); 50 case Sat , Sun:53 case Sat: 51 54 fmt.Println( "weekend" ); 52 55 } … … 54 57 fmt.Println( i ) 55 58 } 59 fmt.Println(B < TT); 60 } // main 56 61 57 var ar[Sun] int 58 ar[Mon] = 3 59 } // main 62 // go build test.go
Note: See TracChangeset
for help on using the changeset viewer.