Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for 0o (0.05 sec)

  1. test/fixedbugs/issue31747.go

    const (
    	_ = 1_000 // ERROR "underscore in numeric literal requires go1.13 or later \(-lang was set to go1.12; check go.mod\)|requires go1.13"
    	_ = 0b111 // ERROR "binary literal requires go1.13 or later"
    	_ = 0o567 // ERROR "0o/0O-style octal literal requires go1.13 or later"
    	_ = 0xabc // ok
    	_ = 0x0p1 // ERROR "hexadecimal floating-point literal requires go1.13 or later"
    
    	_ = 0b111 // ERROR "binary"
    	_ = 0o567 // ERROR "octal"
    	_ = 0xabc // ok
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 02:54:13 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/go1_12.go

    package p
    
    // numeric literals
    const (
    	_ = 1_000 // ERROR "underscore in numeric literal requires go1.13 or later"
    	_ = 0b111 // ERROR "binary literal requires go1.13 or later"
    	_ = 0o567 // ERROR "0o/0O-style octal literal requires go1.13 or later"
    	_ = 0xabc // ok
    	_ = 0x0p1 // ERROR "hexadecimal floating-point literal requires go1.13 or later"
    
    	_ = 0b111 // ERROR "binary"
    	_ = 0o567 // ERROR "octal"
    	_ = 0xabc // ok
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 02:54:13 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. src/math/big/intconv.go

    //
    // The base argument must be 0 or a value from 2 through MaxBase. If the base
    // is 0, the string prefix determines the actual conversion base. A prefix of
    // “0b” or “0B” selects base 2; a “0”, “0o”, or “0O” prefix selects
    // base 8, and a “0x” or “0X” prefix selects base 16. Otherwise the selected
    // base is 10.
    func (z *Int) scan(r io.ByteScanner, base int) (*Int, int, error) {
    	// determine sign
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  4. test/fixedbugs/issue30722.go

    package p
    
    const (
    	_ = 1_       // ERROR "'_' must separate successive digits"
    	_ = 0b       // ERROR "binary literal has no digits|invalid numeric literal"
    	_ = 0o       // ERROR "octal literal has no digits|invalid numeric literal"
    	_ = 0x       // ERROR "hexadecimal literal has no digits|invalid numeric literal"
    	_ = 0xde__ad // ERROR "'_' must separate successive digits"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 15 02:35:59 UTC 2020
    - 623 bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/scanner_test.go

    		{IntLit, "0O1234", "0O1234", ""},
    
    		{IntLit, "0o", "0o", "octal literal has no digits"},
    		{IntLit, "0o8123", "0o8123", "invalid digit '8' in octal literal"},
    		{IntLit, "0o1293", "0o1293", "invalid digit '9' in octal literal"},
    		{IntLit, "0o12a3", "0o12 a3", ""}, // only accept 0-9
    
    		{FloatLit, "0o.", "0o.", "invalid radix point in octal literal"},
    		{FloatLit, "0o.2", "0o.2", "invalid radix point in octal literal"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 16:11:21 UTC 2022
    - 21.9K bytes
    - Viewed (0)
  6. src/math/big/floatconv_test.go

    		{"0o0e+10", 0},
    		{"-0o0e-10", -zero_},
    		{"0o12", 10},
    		{"0O12E2", 1000},
    		{"0o.4", 0.5},
    		{"0o.01", 0.015625},
    		{"0o.01e3", 15.625},
    
    		// octal mantissa, binary exponent
    		{"0o0p+10", 0},
    		{"-0o0p-10", -zero_},
    		{"0o.12p6", 10},
    		{"0o4p-3", 0.5},
    		{"0o0014p-6", 0.1875},
    		{"0o.001p9", 1},
    		{"0o0.01p7", 2},
    		{"0O0.01P+2", 0.0625},
    
    		// hexadecimal mantissa and exponent
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 24.3K bytes
    - Viewed (0)
  7. test/literal2.go

    // license that can be found in the LICENSE file.
    
    // Test Go2 literal syntax for basic types.
    // Avoid running gofmt on this file to preserve the
    // test cases with upper-case prefixes (0B, 0O, 0X).
    
    package main
    
    import "fmt"
    
    func assert(cond bool) {
    	if !cond {
    		panic("assertion failed")
    	}
    }
    
    func equal(x, y interface{}) bool {
    	if x != y {
    		fmt.Printf("%g != %g\n", x, y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 19 22:45:09 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  8. src/go/scanner/scanner_test.go

    		{token.INT, "0o", "0o", "octal literal has no digits"},
    		{token.INT, "0o8123", "0o8123", "invalid digit '8' in octal literal"},
    		{token.INT, "0o1293", "0o1293", "invalid digit '9' in octal literal"},
    		{token.INT, "0o12a3", "0o12 a3", ""}, // only accept 0-9
    
    		{token.FLOAT, "0o.", "0o.", "invalid radix point in octal literal"},
    		{token.FLOAT, "0o.2", "0o.2", "invalid radix point in octal literal"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 15:38:31 UTC 2023
    - 34.6K bytes
    - Viewed (0)
  9. src/text/scanner/scanner_test.go

    		{Int, "0O1234", "0O1234", ""},
    
    		{Int, "0o", "0o", "octal literal has no digits"},
    		{Int, "0o8123", "0o8123", "invalid digit '8' in octal literal"},
    		{Int, "0o1293", "0o1293", "invalid digit '9' in octal literal"},
    		{Int, "0o12a3", "0o12 a3", ""}, // only accept 0-9
    
    		// octal floats (invalid)
    		{Float, "0o.", "0o.", "invalid radix point in octal literal"},
    		{Float, "0o.2", "0o.2", "invalid radix point in octal literal"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 03:41:50 UTC 2022
    - 25.3K bytes
    - Viewed (0)
  10. src/math/big/natconv.go

    // 0, 2, 8, 10, or 16. Providing an invalid base argument leads to a run-
    // time panic.
    //
    // For base 0, the number prefix determines the actual base: A prefix of
    // “0b” or “0B” selects base 2, “0o” or “0O” selects base 8, and
    // “0x” or “0X” selects base 16. If fracOk is false, a “0” prefix
    // (immediately followed by digits) selects base 8 as well. Otherwise,
    // the selected base is 10 and no prefix is accepted.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 14.6K bytes
    - Viewed (0)
Back to top