Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 185 for iota (0.17 sec)

  1. src/go/doc/example.go

    	// However, if there is a constant group with iota, leave it all: later
    	// constant declarations in the group may have no value and so cannot stand
    	// on their own, and removing any constant from the group could change the
    	// values of subsequent ones.
    	// See testdata/examples/iota.go for a minimal example.
    	var ds []ast.Decl
    	for _, d := range depDecls {
    		switch d := d.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  2. src/go/types/typexpr.go

    		return
    
    	case *Const:
    		check.addDeclDep(obj)
    		if !isValid(typ) {
    			return
    		}
    		if obj == universeIota {
    			if check.iota == nil {
    				check.error(e, InvalidIota, "cannot use iota outside constant declaration")
    				return
    			}
    			x.val = check.iota
    		} else {
    			x.val = obj.val
    		}
    		assert(x.val != nil)
    		x.mode = constant_
    
    	case *TypeName:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  3. src/go/types/stmt.go

    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel {
    		check.labels(body)
    	}
    
    	if sig.results.Len() > 0 && !check.isTerminating(body, "") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  4. doc/go_spec.html

    	b = 1 << iota  // b == 2  (iota == 1)
    	c = 3          // c == 3  (iota == 2, unused)
    	d = 1 << iota  // d == 8  (iota == 3)
    )
    
    const (
    	u         = iota * 42  // u == 0     (untyped integer constant)
    	v float64 = iota * 42  // v == 42.0  (float64 constant)
    	w         = iota * 42  // w == 84    (untyped integer constant)
    )
    
    const x = iota  // x == 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/resolver.go

    					check.declare(fileScope, nil, pkgName, nopos)
    				}
    
    			case *syntax.ConstDecl:
    				// iota is the index of the current constDecl within the group
    				if first < 0 || s.Group == nil || file.DeclList[index-1].(*syntax.ConstDecl).Group != s.Group {
    					first = index
    					last = nil
    				}
    				iota := constant.MakeInt64(int64(index - first))
    
    				// determine which initialization expressions to use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel && !check.conf.IgnoreBranchErrors {
    		check.labels(body)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/runtime/lockrank.go

    // in addition to satisfying the partial order in lockPartialOrder.
    // A few ranks allow self-cycles, which are specified in lockPartialOrder.
    const (
    	lockRankUnknown lockRank = iota
    
    	lockRankSysmon
    	lockRankScavenge
    	lockRankForcegc
    	lockRankDefer
    	lockRankSweepWaiters
    	lockRankAssistQueue
    	lockRankSweep
    	lockRankTestR
    	lockRankTestW
    	lockRankTimerSend
    	lockRankAllocmW
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go

    	//  of an assignment."
    	//
    	// Example:
    	//  var x = _
    	InvalidBlank
    
    	// InvalidIota occurs when the predeclared identifier iota is used outside
    	// of a constant declaration.
    	//
    	// Example:
    	//  var x = iota
    	InvalidIota
    
    	// MissingInitBody occurs when an init function is missing its body.
    	//
    	// Example:
    	//  func init()
    	MissingInitBody
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 34K bytes
    - Viewed (0)
  9. src/syscall/js/js.go

    	gcPtr *ref      // used to trigger the finalizer when the Value is not referenced any more
    }
    
    const (
    	// the type flags need to be in sync with wasm_exec.js
    	typeFlagNone = iota
    	typeFlagObject
    	typeFlagString
    	typeFlagSymbol
    	typeFlagFunction
    )
    
    func makeValue(r ref) Value {
    	var gcPtr *ref
    	typeFlag := (r >> 32) & 7
    	if (r>>32)&nanHead == nanHead && typeFlag != typeFlagNone {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  10. src/time/format.go

    	stdZeroSecond                                  // "05"
    	stdLongYear              = iota + stdNeedDate  // "2006"
    	stdYear                                        // "06"
    	stdPM                    = iota + stdNeedClock // "PM"
    	stdpm                                          // "pm"
    	stdTZ                    = iota                // "MST"
    	stdISO8601TZ                                   // "Z0700"  // prints Z for UTC
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
Back to top