Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for 0o (0.02 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. 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)
  5. 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)
  6. src/math/big/floatconv.go

    // The base argument must be 0, 2, 8, 10, or 16. Providing an invalid base
    // argument will lead 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. Otherwise, the actual base is 10 and
    // no prefix is accepted. The octal prefix "0" is not supported (a leading
    // "0" is simply considered a "0").
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  7. 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)
  8. src/strconv/atoi_test.go

    	{"02000000000000000000000", 0, 1<<64 - 1, ErrRange},
    	{"0200000000000000000000", 0, 1 << 61, nil},
    	{"0b", 0, 0, ErrSyntax},
    	{"0B", 0, 0, ErrSyntax},
    	{"0b101", 0, 5, nil},
    	{"0B101", 0, 5, nil},
    	{"0o", 0, 0, ErrSyntax},
    	{"0O", 0, 0, ErrSyntax},
    	{"0o377", 0, 255, nil},
    	{"0O377", 0, 255, nil},
    
    	// underscores allowed with base == 0 only
    	{"1_2_3_4_5", 0, 12345, nil}, // base 0 => 10
    	{"_12345", 0, 0, ErrSyntax},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 21 05:09:21 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  9. src/fmt/doc.go

    Boolean:
    
    	%t	the word true or false
    
    Integer:
    
    	%b	base 2
    	%c	the character represented by the corresponding Unicode code point
    	%d	base 10
    	%o	base 8
    	%O	base 8 with 0o prefix
    	%q	a single-quoted character literal safely escaped with Go syntax.
    	%x	base 16, with lower-case letters for a-f
    	%X	base 16, with upper-case letters for A-F
    	%U	Unicode format: U+1234; same as "U+%04X"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  10. src/strconv/atoi.go

    //
    // The string may begin with a leading sign: "+" or "-".
    //
    // If the base argument is 0, the true base is implied by the string's
    // prefix following the sign (if present): 2 for "0b", 8 for "0" or "0o",
    // 16 for "0x", and 10 otherwise. Also, for argument base 0 only,
    // underscore characters are permitted as defined by the Go syntax for
    // [integer literals].
    //
    // The bitSize argument specifies the integer type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top