Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 251 for funcPC (0.14 sec)

  1. test/func5.go

    func add(x, y int) int {
    	return x + y
    }
    
    func fn() func(int, int) int {
    	return f
    }
    
    var fc func(int, int, chan int)
    
    func addc(x, y int, c chan int) {
    	c <- x+y
    }
    
    func fnc() func(int, int, chan int) {
    	return fc
    }
    
    func three(x int) {
    	if x != 3 {
    		println("wrong val", x)
    		panic("fail")
    	}
    }
    
    var notmain func()
    
    func emptyresults() {}
    func noresults()    {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 1.5K bytes
    - Viewed (0)
  2. test/func6.go

    // license that can be found in the LICENSE file.
    
    // Test closures in if conditions.
    
    package main
    
    func main() {
    	if func() bool { return true }() {}  // gc used to say this was a syntax error
    	if (func() bool { return true })() {}
    	if (func() bool { return true }()) {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 393 bytes
    - Viewed (0)
  3. src/cmd/internal/obj/riscv/obj.go

    	}
    	funct2 |= enc.funct7
    	if funct2&^3 != 0 {
    		panic("encodeR4: funct2 requires more than 2 bits")
    	}
    	return rs3<<27 | funct2<<25 | rs2<<20 | rs1<<15 | enc.funct3<<12 | funct3<<12 | rd<<7 | enc.opcode
    }
    
    func encodeRII(ins *instruction) uint32 {
    	return encodeR(ins.as, regI(ins.rs1), 0, regI(ins.rd), ins.funct3, ins.funct7)
    }
    
    func encodeRIII(ins *instruction) uint32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 07 03:32:27 UTC 2024
    - 77K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. test/func4.go

    // license that can be found in the LICENSE file.
    
    // Verify that it is illegal to take the address of a function.
    // Does not compile.
    
    package main
    
    var notmain func()
    
    func main() {
    	var x = &main		// ERROR "address of|invalid"
    	main = notmain	// ERROR "assign to|invalid"
    	_ = x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 409 bytes
    - Viewed (0)
  7. 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)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.h

    bool HasTfSavedModelSemantics(ModuleOp module_op);
    
    // Returns the tf_saved_model.global_tensor op that func's arg_index'th argument
    // refers to as a bound input, or null.
    Operation *LookupBoundInput(func::FuncOp func, int arg_index,
                                const SymbolTable &symbol_table);
    
    template <typename T>
    T LookupBoundInputOfType(func::FuncOp func, int arg_index,
                             const SymbolTable &symbol_table) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 18 03:21:34 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. 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)
  10. docs/pt/docs/advanced/events.md

        Talvez você precise inicializar uma nova versão, ou apenas cansou de executá-la. 🤷
    
    ### Função _lifespan_
    
    A primeira coisa a notar, é que estamos definindo uma função assíncrona com `yield`. Isso é muito semelhante à Dependências com `yield`.
    
    ```Python hl_lines="14-19"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    A primeira parte da função, antes do `yield`, será  executada **antes** da aplicação inicializar.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
Back to top