Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for c1 (3.35 sec)

  1. doc/go1.17_spec.html

    a select with only <code>nil</code> channels and no default case blocks forever.
    </p>
    
    <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 {
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  2. doc/go_spec.html

    a select with only <code>nil</code> channels and no default case blocks forever.
    </p>
    
    <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 {
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top