Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for C4 (0.01 sec)

  1. doc/go1.17_spec.html

    <pre>
    var a []int
    var c, c1, c2, c3, c4 chan int
    var i1, i2 int
    select {
    case i1 = &lt;-c1:
    	print("received ", i1, " from c1\n")
    case c2 &lt;- i2:
    	print("sent ", i2, " to c2\n")
    case i3, ok := (&lt;-c3):  // same as: i3, ok := &lt;-c3
    	if ok {
    		print("received ", i3, " from c3\n")
    	} else {
    		print("c3 is closed\n")
    	}
    case a[f()] = &lt;-c4:
    	// same as:
    	// case t := &lt;-c4
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 10 18:25:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
Back to top