Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 3,773 for func4 (0.24 sec)

  1. src/text/template/funcs.go

    	return m
    }
    
    // addValueFuncs adds to values the functions in funcs, converting them to reflect.Values.
    func addValueFuncs(out map[string]reflect.Value, in FuncMap) {
    	for name, fn := range in {
    		if !goodName(name) {
    			panic(fmt.Errorf("function name %q is not a valid identifier", name))
    		}
    		v := reflect.ValueOf(fn)
    		if v.Kind() != reflect.Func {
    			panic("value for " + name + " not a function")
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  2. test/func3.go

    // Verify that illegal function signatures are detected.
    // Does not compile.
    
    package main
    
    type t1 int
    type t2 int
    type t3 int
    
    func f1(*t2, x t3)	// ERROR "named"
    func f2(t1, *t2, x t3)	// ERROR "named"
    func f3() (x int, *string)	// ERROR "named"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 505 bytes
    - Viewed (0)
  3. test/func7.go

    // license that can be found in the LICENSE file.
    
    // Test evaluation order in if condition.
    
    package main
    
    var calledf = false
    
    func f() int {
    	calledf = true
    	return 1
    }
    
    func g() int {
    	if !calledf {
    		panic("BUG: func7 - called g before f")
    	}
    	return 0
    }
    
    func main() {
    	// gc used to evaluate g() before f().
    	if f() < g() {
    		panic("wrong answer")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 477 bytes
    - Viewed (0)
  4. test/func2.go

    package main
    
    type t1 int
    type t2 int
    type t3 int
    
    func f1(t1, t2, t3)
    func f2(t1, t2, t3 bool)
    func f3(t1, t2, x t3)
    func f4(t1, *t3)
    func (x *t1) f5(y []t2) (t1, *t3)
    func f6() (int, *string)
    func f7(*t2, t3)
    func f8(os int) int
    
    func f9(os int) int {
    	return os
    }
    func f10(err error) error {
    	return err
    }
    func f11(t1 string) string {
    	return t1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 578 bytes
    - Viewed (0)
  5. src/cmd/cover/func.go

    			startLine: start.Line,
    			startCol:  start.Column,
    			endLine:   end.Line,
    			endCol:    end.Column,
    		}
    		v.funcs = append(v.funcs, fe)
    	}
    	return v
    }
    
    // coverage returns the fraction of the statements in the function that were covered, as a numerator and denominator.
    func (f *FuncExtent) coverage(profile *cover.Profile) (num, den int64) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 17:49:12 UTC 2022
    - 6.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/func.cc

    // Returns true iff the function's symbol is public.
    bool IsPublicFuncOp(func::FuncOp func_op) {
      return SymbolTable::getSymbolVisibility(&*func_op) ==
             SymbolTable::Visibility::Public;
    }
    
    }  // namespace
    
    func::FuncOp FindMainFuncOp(ModuleOp module_op) {
      if (const auto main_func_op = module_op.lookupSymbol<func::FuncOp>(
              kImportModelDefaultGraphFuncName);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 19 06:55:11 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. src/syscall/js/func.go

    func (c Func) Release() {
    	funcsMu.Lock()
    	delete(funcs, c.id)
    	funcsMu.Unlock()
    }
    
    // setEventHandler is defined in the runtime package.
    func setEventHandler(fn func() bool)
    
    func init() {
    	setEventHandler(handleEvent)
    }
    
    // handleEvent retrieves the pending event (window._pendingEvent) and calls the js.Func on it.
    // It returns true if an event was handled.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 17:47:47 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  8. test/func.go

    // Test simple functions.
    
    package main
    
    func assertequal(is, shouldbe int, msg string) {
    	if is != shouldbe {
    		print("assertion fail", msg, "\n")
    		panic(1)
    	}
    }
    
    func f1() {
    }
    
    func f2(a int) {
    }
    
    func f3(a, b int) int {
    	return a + b
    }
    
    func f4(a, b int, c float32) int {
    	return (a+b)/2 + int(c)
    }
    
    func f5(a int) int {
    	return 5
    }
    
    func f6(a int) (r int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 1.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/func.go

    }
    func (f *Func) ConstInt32(t *types.Type, c int32) *Value {
    	return f.constVal(OpConst32, t, int64(c), true)
    }
    func (f *Func) ConstInt64(t *types.Type, c int64) *Value {
    	return f.constVal(OpConst64, t, c, true)
    }
    func (f *Func) ConstFloat32(t *types.Type, c float64) *Value {
    	return f.constVal(OpConst32F, t, int64(math.Float64bits(float64(float32(c)))), true)
    }
    func (f *Func) ConstFloat64(t *types.Type, c float64) *Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/func.go

    // (Call typecheck.Func instead.)
    func tcFunc(n *ir.Func) {
    	if base.EnableTrace && base.Flag.LowerT {
    		defer tracePrint("tcFunc", n)(nil)
    	}
    
    	if name := n.Nname; name.Typecheck() == 0 {
    		base.AssertfAt(name.Type() != nil, n.Pos(), "missing type: %v", name)
    		name.SetTypecheck(1)
    	}
    }
    
    // tcCall typechecks an OCALL node.
    func tcCall(n *ir.CallExpr, top int) ir.Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top