Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for p2 (0.2 sec)

  1. doc/go1.17_spec.html

    <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>
    The length of an array literal is the length specified in the literal type.
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  2. doc/go_spec.html

    	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 Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 00:39:16 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top