Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testdata (0.15 sec)

  1. doc/go1.17_spec.html

    If the iteration variables are declared outside the "for" statement,
    after execution their values will be those of the last iteration.
    </p>
    
    <pre>
    var testdata *struct {
    	a *[7]int
    }
    for i, _ := range testdata.a {
    	// testdata.a is never evaluated; len(testdata.a) is constant
    	// i ranges from 0 to 6
    	f(i)
    }
    
    var a [10]string
    for i, s := range a {
    	// type of i is int
    	// type of s is string
    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)
Back to top