Search code examples
eiffel

How to declare an INTEGER_64 from number?


How to declare an INTEGER_64 from a declared number?

("3000000000").to_integer_64

is the only way I found


Solution

  • This should work:

    {INTEGER_64} 3000000000
    

    examples:

    local
        int_64: INTEGER_64
    do
        int_64 := {INTEGER_64} 3000000000
        do_something_with_an_int_64 ({INTEGER_64} 3000000000)
    end
    

    The same applies to all variants of INTEGER, NATURAL, REAL, STRING and (since EiffelStudio 19.07) IMMUTABLE_STRING.