Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for 0b1e10 (0.12 sec)

  1. src/cmd/compile/internal/syntax/scanner_test.go

    func TestNumbers(t *testing.T) {
    	for _, test := range []struct {
    		kind             LitKind
    		src, tokens, err string
    	}{
    		// binaries
    		{IntLit, "0b0", "0b0", ""},
    		{IntLit, "0b1010", "0b1010", ""},
    		{IntLit, "0B1110", "0B1110", ""},
    
    		{IntLit, "0b", "0b", "binary literal has no digits"},
    		{IntLit, "0b0190", "0b0190", "invalid digit '9' in binary literal"},
    		{IntLit, "0b01a0", "0b01 a0", ""}, // only accept 0-9
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 16:11:21 UTC 2022
    - 21.9K bytes
    - Viewed (0)
  2. src/text/scanner/scanner_test.go

    }
    
    func TestNumbers(t *testing.T) {
    	for _, test := range []struct {
    		tok              rune
    		src, tokens, err string
    	}{
    		// binaries
    		{Int, "0b0", "0b0", ""},
    		{Int, "0b1010", "0b1010", ""},
    		{Int, "0B1110", "0B1110", ""},
    
    		{Int, "0b", "0b", "binary literal has no digits"},
    		{Int, "0b0190", "0b0190", "invalid digit '9' in binary literal"},
    		{Int, "0b01a0", "0b01 a0", ""}, // only accept 0-9
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 03:41:50 UTC 2022
    - 25.3K bytes
    - Viewed (0)
  3. src/go/scanner/scanner_test.go

    func TestNumbers(t *testing.T) {
    	for _, test := range []struct {
    		tok              token.Token
    		src, tokens, err string
    	}{
    		// binaries
    		{token.INT, "0b0", "0b0", ""},
    		{token.INT, "0b1010", "0b1010", ""},
    		{token.INT, "0B1110", "0B1110", ""},
    
    		{token.INT, "0b", "0b", "binary literal has no digits"},
    		{token.INT, "0b0190", "0b0190", "invalid digit '9' in binary 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)
  4. test/literal2.go

    	// binaries
    	assert(0b_1 == 1)
    	assert(0b10 == 2)
    	assert(0b_1_0 == 2)
    	assert(0b_1_0i == complex(0, 2))
    
    	// decimal floats
    	assert(0. == 0.0)
    	assert(.0 == 0.0)
    	assert(1_0. == 10.0)
    	assert(.0_1 == 0.01)
    	assert(1_0.0_1 == 10.01)
    	assert(1_0.0_1i == complex(0, 10.01))
    
    	assert(0.e1_0 == 0.0e10)
    	assert(.0e1_0 == 0.0e10)
    	assert(1_0.e1_0 == 10.0e10)
    	assert(.0_1e1_0 == 0.01e10)
    	assert(1_0.0_1e1_0 == 10.01e10)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 19 22:45:09 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  5. src/cmd/gofmt/testdata/go2numbers.golden

    	_ = 0o0
    	_ = 0o1234
    	_ = 0o01234567
    
    	_ = 0o_0
    	_ = 0o_1234
    	_ = 0o0123_4567
    
    	_ = 0o_0
    	_ = 0o_1234
    	_ = 0o0123_4567
    
    	// binaries
    	_ = 0b0
    	_ = 0b1011
    	_ = 0b00101101
    
    	_ = 0b0
    	_ = 0b1011
    	_ = 0b00101101
    
    	_ = 0b_0
    	_ = 0b10_11
    	_ = 0b_0010_1101
    
    	// decimal floats
    	_ = 0.
    	_ = 123.
    	_ = 0123.
    
    	_ = .0
    	_ = .123
    	_ = .0123
    
    	_ = 0e0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 21 17:24:29 UTC 2019
    - 1.9K bytes
    - Viewed (0)
  6. src/cmd/gofmt/testdata/go2numbers.input

    	_ = 0O0
    	_ = 0O1234
    	_ = 0O01234567
    
    	_ = 0o_0
    	_ = 0o_1234
    	_ = 0o0123_4567
    
    	_ = 0O_0
    	_ = 0O_1234
    	_ = 0O0123_4567
    
    	// binaries
    	_ = 0b0
    	_ = 0b1011
    	_ = 0b00101101
    
    	_ = 0B0
    	_ = 0B1011
    	_ = 0B00101101
    
    	_ = 0b_0
    	_ = 0b10_11
    	_ = 0b_0010_1101
    
    	// decimal floats
    	_ = 0.
    	_ = 123.
    	_ = 0123.
    
    	_ = .0
    	_ = .123
    	_ = .0123
    
    	_ = 0e0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 21 17:24:29 UTC 2019
    - 2K bytes
    - Viewed (0)
  7. src/go/printer/testdata/go2numbers.golden

    	_	= 0O0
    	_	= 0O1234
    	_	= 0O01234567
    
    	_	= 0o_0
    	_	= 0o_1234
    	_	= 0o0123_4567
    
    	_	= 0O_0
    	_	= 0O_1234
    	_	= 0O0123_4567
    
    	// binaries
    	_	= 0b0
    	_	= 0b1011
    	_	= 0b00101101
    
    	_	= 0B0
    	_	= 0B1011
    	_	= 0B00101101
    
    	_	= 0b_0
    	_	= 0b10_11
    	_	= 0b_0010_1101
    
    	// decimal floats
    	_	= 0.
    	_	= 123.
    	_	= 0123.
    
    	_	= .0
    	_	= .123
    	_	= .0123
    
    	_	= 0e0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 21:54:06 UTC 2020
    - 2K bytes
    - Viewed (0)
  8. src/go/printer/testdata/go2numbers.norm

    	_	= 0o0
    	_	= 0o1234
    	_	= 0o01234567
    
    	_	= 0o_0
    	_	= 0o_1234
    	_	= 0o0123_4567
    
    	_	= 0o_0
    	_	= 0o_1234
    	_	= 0o0123_4567
    
    	// binaries
    	_	= 0b0
    	_	= 0b1011
    	_	= 0b00101101
    
    	_	= 0b0
    	_	= 0b1011
    	_	= 0b00101101
    
    	_	= 0b_0
    	_	= 0b10_11
    	_	= 0b_0010_1101
    
    	// decimal floats
    	_	= 0.
    	_	= 123.
    	_	= 0123.
    
    	_	= .0
    	_	= .123
    	_	= .0123
    
    	_	= 0e0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 17 02:15:01 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  9. src/cmd/internal/obj/s390x/condition_code.go

    //
    // Condition code masks represent the 4 possible values of
    // the 2-bit condition code as individual bits. Since IBM Z
    // is a big-endian platform bits are numbered from left to
    // right. The lowest value, 0, is represented by 8 (0b1000)
    // and the highest value, 3, is represented by 1 (0b0001).
    //
    // Note that condition code values have different semantics
    // depending on the instruction that set the condition code.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 08 01:46:31 UTC 2020
    - 3.2K bytes
    - Viewed (0)
  10. src/math/big/intconv_test.go

    	{"10", "%x", "a"},
    	{"10", "%X", "A"},
    	{"-10", "%X", "-A"},
    	{"10", "%y", "%!y(big.Int=10)"},
    	{"-10", "%y", "%!y(big.Int=-10)"},
    
    	{"10", "%#b", "0b1010"},
    	{"10", "%#o", "012"},
    	{"10", "%O", "0o12"},
    	{"-10", "%#b", "-0b1010"},
    	{"-10", "%#o", "-012"},
    	{"-10", "%O", "-0o12"},
    	{"10", "%#d", "10"},
    	{"10", "%#v", "10"},
    	{"10", "%#x", "0xa"},
    	{"10", "%#X", "0XA"},
    	{"-10", "%#X", "-0XA"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 12 22:58:58 UTC 2019
    - 10K bytes
    - Viewed (0)
Back to top