Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 385 for S1 (0.02 sec)

  1. test/ken/simpconv.go

    // license that can be found in the LICENSE file.
    
    // Test simple arithmetic conversion.
    
    package main
    
    type vlong int64
    type short int16
    
    func main() {
    	s1 := vlong(0)
    	for i := short(0); i < 10; i = i + 1 {
    		s1 = s1 + vlong(i)
    	}
    	if s1 != 45 {
    		panic(s1)
    	}
    
    	s2 := float64(0)
    	for i := 0; i < 10; i = i + 1 {
    		s2 = s2 + float64(i)
    	}
    	if s2 != 45 {
    		panic(s2)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 490 bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/init0.go

    	a3 = b3
    	b3 /* ERROR "initialization cycle for b3" */ int = c3
    	c3 = d3
    	d3 = b3
    )
    
    // cycles via struct fields
    
    type S1 struct {
    	f int
    }
    const cx3 S1 /* ERROR "invalid constant type" */ = S1{cx3.f}
    var vx3 /* ERROR "initialization cycle: vx3 refers to itself" */ S1 = S1{vx3.f}
    
    // cycles via functions
    
    var x4 = x5
    var x5 /* ERROR "initialization cycle for x5" */ = f1()
    func f1() int { return x5*10 }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. test/fixedbugs/bug475.go

    // license that can be found in the LICENSE file.
    
    // Variable in enclosing function with same name as field in struct
    // composite literal confused gccgo.
    
    package p
    
    type s1 struct {
    	f *s1
    }
    
    func F() {
    	var f *s1
    	_ = func() {
    		_ = s1{f: nil}
    	}
    	_ = f
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 381 bytes
    - Viewed (0)
  4. test/assign1.go

    	p0 = (*int)(p)
    	p0 = (*int)(p1)
    	p = P(p0)
    	p = P(p1)
    	p1 = P1(p0)
    	p1 = P1(p)
    
    	s0 = struct {
    		X int
    	}(s)
    	s0 = struct {
    		X int
    	}(s1)
    	s = S(s0)
    	s = S(s1)
    	s1 = S1(s0)
    	s1 = S1(s)
    
    	pa0 = (*[10]int)(pa)
    	pa0 = (*[10]int)(pa1)
    	pa = (*A)(pa0)
    	pa = (*A)(pa1)
    	pa1 = (*A1)(pa0)
    	pa1 = (*A1)(pa)
    
    	pb0 = (*[]int)(pb)
    	pb0 = (*[]int)(pb1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 02:19:43 UTC 2012
    - 5.6K bytes
    - Viewed (0)
  5. test/fixedbugs/issue38690.go

    package main
    
    type A1 = [0]int
    type A2 = [1]int
    
    type S1 struct{}
    
    type S2 struct {
    	x int
    }
    
    type S3 = struct{}
    
    type S4 = struct{ x int }
    
    type S struct {
    	x int
    	_ [0]int
    	_ [1]int
    	_ A1
    	_ A2
    	_ S1
    	_ S2
    	_ S3
    	_ S4
    	_ [1]S4
    }
    
    var s = S{1, [0]int{}, [1]int{1}, A1{}, A2{1}, S1{}, S2{1}, S3{}, S4{1}, [1]S4{}}
    
    func main() {
    	f1()
    	mustPanic(f2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 06 04:34:54 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/sets/byte.go

    // s2.SymmetricDifference(s1) = {a3, a4, a5}
    func (s1 Byte) SymmetricDifference(s2 Byte) Byte {
    	return Byte(cast(s1).SymmetricDifference(cast(s2)))
    }
    
    // Union returns a new set which includes items in either s1 or s2.
    // For example:
    // s1 = {a1, a2}
    // s2 = {a3, a4}
    // s1.Union(s2) = {a1, a2, a3, a4}
    // s2.Union(s1) = {a1, a2, a3, a4}
    func (s1 Byte) Union(s2 Byte) Byte {
    	return Byte(cast(s1).Union(cast(s2)))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 03:47:18 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/sets/int64.go

    // s2.SymmetricDifference(s1) = {a3, a4, a5}
    func (s1 Int64) SymmetricDifference(s2 Int64) Int64 {
    	return Int64(cast(s1).SymmetricDifference(cast(s2)))
    }
    
    // Union returns a new set which includes items in either s1 or s2.
    // For example:
    // s1 = {a1, a2}
    // s2 = {a3, a4}
    // s1.Union(s2) = {a1, a2, a3, a4}
    // s2.Union(s1) = {a1, a2, a3, a4}
    func (s1 Int64) Union(s2 Int64) Int64 {
    	return Int64(cast(s1).Union(cast(s2)))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 03:47:18 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/sets/string.go

    // s2.SymmetricDifference(s1) = {a3, a4, a5}
    func (s1 String) SymmetricDifference(s2 String) String {
    	return String(cast(s1).SymmetricDifference(cast(s2)))
    }
    
    // Union returns a new set which includes items in either s1 or s2.
    // For example:
    // s1 = {a1, a2}
    // s2 = {a3, a4}
    // s1.Union(s2) = {a1, a2, a3, a4}
    // s2.Union(s1) = {a1, a2, a3, a4}
    func (s1 String) Union(s2 String) String {
    	return String(cast(s1).Union(cast(s2)))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 03:47:18 UTC 2022
    - 4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/util/sets/set.go

    // For example:
    // s1 = {a1, a2, a3}
    // s2 = {a1, a2, a4, a5}
    // s1.SymmetricDifference(s2) = {a3, a4, a5}
    // s2.SymmetricDifference(s1) = {a3, a4, a5}
    func (s1 Set[T]) SymmetricDifference(s2 Set[T]) Set[T] {
    	return s1.Difference(s2).Union(s2.Difference(s1))
    }
    
    // Union returns a new set which includes items in either s1 or s2.
    // For example:
    // s1 = {a1, a2}
    // s2 = {a3, a4}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 19:51:18 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  10. src/hash/adler32/adler32.go

    func update(d digest, p []byte) digest {
    	s1, s2 := uint32(d&0xffff), uint32(d>>16)
    	for len(p) > 0 {
    		var q []byte
    		if len(p) > nmax {
    			p, q = p[:nmax], p[nmax:]
    		}
    		for len(p) >= 4 {
    			s1 += uint32(p[0])
    			s2 += s1
    			s1 += uint32(p[1])
    			s2 += s1
    			s1 += uint32(p[2])
    			s2 += s1
    			s1 += uint32(p[3])
    			s2 += s1
    			p = p[4:]
    		}
    		for _, x := range p {
    			s1 += uint32(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top