Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for correctly (0.16 sec)

  1. doc/go_mem.html

    </p>
    
    <p>
    This fact invalidates a few common idioms.
    </p>
    
    <p>
    Double-checked locking is an attempt to avoid the overhead of synchronization.
    For example, the <code>twoprint</code> program might be
    incorrectly written as:
    </p>
    
    <pre>
    var a string
    var done bool
    
    func setup() {
    	a = "hello, world"
    	done = true
    }
    
    func doprint() {
    	if !done {
    		once.Do(setup)
    	}
    	print(a)
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  2. doc/go1.17_spec.html

    a <a href="#Run_time_panics">run-time panic</a> occurs.
    In other words, even though the dynamic type of <code>x</code>
    is known only at run time, the type of <code>x.(T)</code> is
    known to be <code>T</code> in a correct program.
    </p>
    
    <pre>
    var x interface{} = 7          // x has dynamic type int and value 7
    i := x.(int)                   // i has type int and value 7
    
    type I interface { m() }
    
    func f(y I) {
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  3. doc/asm.html

    a struct with a <code>_size</code> field), <code>#include
    "go_asm.h"</code> will fail with a "redefinition of macro" error.
    </p>
    
    <h3 id="runtime">Runtime Coordination</h3>
    
    <p>
    For garbage collection to run correctly, the runtime must know the
    location of pointers in all global data and in most stack frames.
    The Go compiler emits this information when compiling Go source files,
    but assembly programs must define it explicitly.
    </p>
    
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Tue Nov 28 19:15:27 GMT 2023
    - 36.3K bytes
    - Viewed (0)
  4. doc/go_spec.html

    <h3 id="Language_versions">Language versions</h3>
    
    <p>
    The <a href="/doc/go1compat">Go 1 compatibility guarantee</a> ensures that
    programs written to the Go 1 specification will continue to compile and run
    correctly, unchanged, over the lifetime of that specification.
    More generally, as adjustments are made and features added to the language,
    the compatibility guarantee ensures that a Go program that works with a
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top