Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for p1 (0.15 sec)

  1. doc/go1.17_spec.html

    Consequently, taking the address of an empty slice or map composite literal
    does not have the same effect as allocating a new slice or map value with
    <a href="#Allocation">new</a>.
    </p>
    
    <pre>
    p1 := &amp;[]int{}    // p1 points to an initialized, empty slice with value []int{} and length 0
    p2 := new([]int)  // p2 points to an uninitialized slice with value nil and length 0
    </pre>
    
    <p>
    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

    	A5 = func(x int, _ float64) *[]string
    
    	B0 A0
    	B1 []string
    	B2 struct{ a, b int }
    	B3 struct{ a, c int }
    	B4 func(int, float64) *B0
    	B5 func(x int, y float64) *A1
    
    	C0 = B0
    	D0[P1, P2 any] struct{ x P1; y P2 }
    	E0 = D0[int, string]
    )
    </pre>
    
    <p>
    these types are identical:
    </p>
    
    <pre>
    A0, A1, and []string
    A2 and struct{ a, b int }
    A3 and int
    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