Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for allNumeric (0.15 sec)

  1. src/go/types/expr.go

    func init() {
    	// Setting binaryOpPredicates in init avoids declaration cycles.
    	binaryOpPredicates = opPredicates{
    		token.ADD: allNumericOrString,
    		token.SUB: allNumeric,
    		token.MUL: allNumeric,
    		token.QUO: allNumeric,
    		token.REM: allInteger,
    
    		token.AND:     allInteger,
    		token.OR:      allInteger,
    		token.XOR:     allInteger,
    		token.AND_NOT: allInteger,
    
    		token.LAND: allBoolean,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/expr.go

    func init() {
    	// Setting binaryOpPredicates in init avoids declaration cycles.
    	binaryOpPredicates = opPredicates{
    		syntax.Add: allNumericOrString,
    		syntax.Sub: allNumeric,
    		syntax.Mul: allNumeric,
    		syntax.Div: allNumeric,
    		syntax.Rem: allInteger,
    
    		syntax.And:    allInteger,
    		syntax.Or:     allInteger,
    		syntax.Xor:    allInteger,
    		syntax.AndNot: allInteger,
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/predicates.go

    func allBoolean(t Type) bool         { return allBasic(t, IsBoolean) }
    func allInteger(t Type) bool         { return allBasic(t, IsInteger) }
    func allUnsigned(t Type) bool        { return allBasic(t, IsUnsigned) }
    func allNumeric(t Type) bool         { return allBasic(t, IsNumeric) }
    func allString(t Type) bool          { return allBasic(t, IsString) }
    func allOrdered(t Type) bool         { return allBasic(t, IsOrdered) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. src/go/types/predicates.go

    func allBoolean(t Type) bool         { return allBasic(t, IsBoolean) }
    func allInteger(t Type) bool         { return allBasic(t, IsInteger) }
    func allUnsigned(t Type) bool        { return allBasic(t, IsUnsigned) }
    func allNumeric(t Type) bool         { return allBasic(t, IsNumeric) }
    func allString(t Type) bool          { return allBasic(t, IsString) }
    func allOrdered(t Type) bool         { return allBasic(t, IsOrdered) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    			check.errorf(inNode(s, s.TokPos), InvalidSyntaxTree, "unknown inc/dec operation %s", s.Tok)
    			return
    		}
    
    		var x operand
    		check.expr(nil, &x, s.X)
    		if x.mode == invalid {
    			return
    		}
    		if !allNumeric(x.typ) {
    			check.errorf(s.X, NonNumericIncDec, invalidOp+"%s%s (non-numeric type %s)", s.X, s.Tok, x.typ)
    			return
    		}
    
    		Y := &ast.BasicLit{ValuePos: s.X.Pos(), Kind: token.INT, Value: "1"} // use x's position
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    		if s.Rhs == nil {
    			// x++ or x--
    			// (no need to call unpackExpr as s.Lhs must be single-valued)
    			var x operand
    			check.expr(nil, &x, s.Lhs)
    			if x.mode == invalid {
    				return
    			}
    			if !allNumeric(x.typ) {
    				check.errorf(s.Lhs, NonNumericIncDec, invalidOp+"%s%s%s (non-numeric type %s)", s.Lhs, s.Op, s.Op, x.typ)
    				return
    			}
    			check.assignVar(s.Lhs, nil, &x, "assignment")
    			return
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top