Arjailer

Forum Replies Created

Viewing 2 posts - 61 through 62 (of 62 total)
  • Author
    Posts
  • in reply to: Implicit type conversions #1538

    Arjailer
    Participant

    I’ve sorted it now using generics  🙂

    in reply to: Implicit type conversions #1508

    Arjailer
    Participant

    Yep – I have a Long overload as you guessed – that’ll be the problem  🙂

    I was hoping that I’d just need Double and Long overloads and then could pass in any of the numeric types – something like how C# does it where it’ll implicity convert to “larger” types, but you need to explicity convert to “smaller” types: https://msdn.microsoft.com/en-us/library/y5b434w4.aspx

    But it’s not really a problem adding overloads for the other numeric types.

    For testing these (and other) functions is there any way to specify a double literal in code? e.g. Java and C# let you use 123.45f for float, 123.45d for double, 123L for long etc.

Viewing 2 posts - 61 through 62 (of 62 total)