Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Integer_literals (3.39 sec)

  1. src/strconv/atoi.go

    // signed integer of the given size, err.Err = [ErrRange] and the
    // returned value is the maximum magnitude integer of the
    // appropriate bitSize and sign.
    //
    // [integer literals]: https://go.dev/ref/spec#Integer_literals
    func ParseInt(s string, base int, bitSize int) (i int64, err error) {
    	const fnParseInt = "ParseInt"
    
    	if s == "" {
    		return 0, syntaxError(fnParseInt, s)
    	}
    
    	// Pick off leading sign.
    	s0 := s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/execution/CombinatorsTest.kt

            assertSuccess(parser("0B0"))
            assertSuccess(parser("0b101010"))
            assertSuccess(parser("0b10101_0"))
    
            assertFailure(
                parser("bar"),
                "Expecting token of type INTEGER_LITERAL, but got IDENTIFIER ('bar') instead"
            )
        }
    
        @Test
        fun `can parse floating point numbers`() {
            val parser = combinator.floatLiteral
    
            assertSuccess(parser("0e0"))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top