Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for index (0.14 sec)

  1. doc/go1.17_spec.html

    <p>
    If <code>a</code> is not a map:
    </p>
    <ul>
    	<li>the index <code>x</code> must be of integer type or an untyped constant</li>
    	<li>a constant index must be non-negative and
    	    <a href="#Representability">representable</a> by a value of type <code>int</code></li>
    	<li>a constant index that is untyped is given type <code>int</code></li>
    	<li>the index <code>x</code> is <i>in range</i> if <code>0 &lt;= x &lt; len(a)</code>,
    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. src/cmd/asm/internal/asm/testdata/amd64error.s

    	// AVX512GATHER index/index #UD cases.
    	VPGATHERQQ (BP)(X2*2), K1, X2   // ERROR "index and destination registers should be distinct"
    	VPGATHERQQ (BP)(Y15*2), K1, Y15 // ERROR "index and destination registers should be distinct"
    	VPGATHERQQ (BP)(Z20*2), K1, Z20 // ERROR "index and destination registers should be distinct"
    	VPGATHERDQ (BP)(X2*2), K1, X2   // ERROR "index and destination registers should be distinct"
    Others
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 14 00:03:57 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  3. src/bytes/boundary_test.go

    		for i := range b {
    			idx := Index(b[i:], q[:j])
    			if idx != -1 {
    				t.Fatalf("Index(b[%d:], q[:%d])=%d, want -1\n", i, j, idx)
    			}
    		}
    		q[j-1] = 0
    	}
    
    	// Test differing alignments and sizes of q which always end on a page boundary.
    	q[len(q)-1] = 1 // difference is only found on the last byte
    	for j := 0; j < len(q); j++ {
    		for i := range b {
    			idx := Index(b[i:], q[j:])
    			if idx != -1 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 30 20:05:58 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. src/bytes/bytes.go

    		}
    		if r == tr {
    			continue
    		}
    		return false
    	}
    
    	// One string is empty. Are both?
    	return len(s) == len(t)
    }
    
    // Index returns the index of the first instance of sep in s, or -1 if sep is not present in s.
    func Index(s, sep []byte) int {
    	n := len(sep)
    	switch {
    	case n == 0:
    		return 0
    	case n == 1:
    		return IndexByte(s, sep[0])
    	case n == len(s):
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  5. src/bytes/bytes_test.go

    }
    
    func bmIndexRuneASCII(index func([]byte, rune) int) func(b *testing.B, n int) {
    	return func(b *testing.B, n int) {
    		buf := bmbuf[0:n]
    		buf[n-1] = 'x'
    		for i := 0; i < b.N; i++ {
    			j := index(buf, 'x')
    			if j != n-1 {
    				b.Fatal("bad index", j)
    			}
    		}
    		buf[n-1] = '\x00'
    	}
    }
    
    func bmIndexRune(index func([]byte, rune) int) func(b *testing.B, n int) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/ast.go

    		f.walk(n.Elts, ctxExpr, visit)
    	case *ast.ParenExpr:
    		f.walk(&n.X, context, visit)
    	case *ast.SelectorExpr:
    		f.walk(&n.X, ctxSelector, visit)
    	case *ast.IndexExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		f.walk(&n.Index, ctxExpr, visit)
    	case *ast.SliceExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		if n.Low != nil {
    			f.walk(&n.Low, ctxExpr, visit)
    		}
    		if n.High != nil {
    			f.walk(&n.High, ctxExpr, visit)
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  7. src/cmd/cgo/godefs.go

    	//	// +godefs map struct_in_addr6 [16]byte
    	//
    	for _, g := range f.Comments {
    		for _, c := range g.List {
    			i := strings.Index(c.Text, "+godefs map")
    			if i < 0 {
    				continue
    			}
    			s := strings.TrimSpace(c.Text[i+len("+godefs map"):])
    			i = strings.Index(s, " ")
    			if i < 0 {
    				fmt.Fprintf(os.Stderr, "invalid +godefs map comment: %s\n", c.Text)
    				continue
    			}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  8. src/bytes/reader.go

    // Unlike a [Buffer], a Reader is read-only and supports seeking.
    // The zero value for Reader operates like a Reader of an empty slice.
    type Reader struct {
    	s        []byte
    	i        int64 // current reading index
    	prevRune int   // index of previous rune; or < 0
    }
    
    // Len returns the number of bytes of the unread portion of the
    // slice.
    func (r *Reader) Len() int {
    	if r.i >= int64(len(r.s)) {
    		return 0
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  9. src/cmd/asm/main.go

    	ctxt.IsAsm = true
    	ctxt.Pkgpath = *flags.Importpath
    	switch *flags.Spectre {
    	default:
    		log.Printf("unknown setting -spectre=%s", *flags.Spectre)
    		os.Exit(2)
    	case "":
    		// nothing
    	case "index":
    		// known to compiler; ignore here so people can use
    		// the same list with -gcflags=-spectre=LIST and -asmflags=-spectrre=LIST
    	case "all", "ret":
    		ctxt.Retpoline = true
    	}
    
    	ctxt.Bso = bufio.NewWriter(os.Stdout)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  10. src/cmd/cgo/gcc.go

    	if !ok || u.Op != token.AND {
    		return false
    	}
    	index, ok := u.X.(*ast.IndexExpr)
    	if !ok {
    		return false
    	}
    
    	addr := ""
    	deref := ""
    	if p.isVariable(index.X) {
    		addr = "&"
    		deref = "*"
    	}
    
    	fmt.Fprintf(sb, "_cgoIndex%d := %s%s; ", i, addr, gofmtPos(index.X, index.X.Pos()))
    	origX := index.X
    	index.X = ast.NewIdent(fmt.Sprintf("_cgoIndex%d", i))
    	if deref == "*" {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
Back to top