long hex

This topic contains 4 replies, has 4 voices, and was last updated by  nerobot 1 year, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12620

    Simon Armstrong
    Participant

    This line initialises TriggerBit to 0, I seem to remember some chat about decimal longs but maybe hex ones are still problematic?

    Const TriggerBit:=$200000000

    #12621

    Mark Sibly
    Keymaster

    Currently, you need to cast literals to long if they can’t fit in an int, eg:

    More convenient syntax for this will proabably happen, eg: $20000000L etc.

    Also, enums are currently 32 bit ints only so that may be a problem…I think attempting to support bitmasks via enums might have been a bit of a woopsie…

    #12656

    Simon Armstrong
    Participant

    I just ran into this again today.

    I want to support left button drag, right button drag and both button drag.

    However MouseEvent.Button is an enum so bit testing for above drag types is allowed even though it doesn’t seem to work.

    Edit: oh right mouse button has value 3, that I was not expecting.

    #12670

    abakobo
    Participant

    More convenient syntax for this will proabably happen, eg: $20000000L

    Is it due to parser limitations? or is it a kind of visual helper? I’d personnaly rather like to be able to use any kind of literals up to Max_Unsigned_64bit without special syntax for bigger ones.

    A 64bit enum type would be great too for bitmasking too!

    #12672

    nerobot
    Participant

    It’s for the parser.

    In other langs:

    * decimal number is an Integer, and L-suffix means Long: 100L

    * floating number is a Double, and F-suffix means Float: 3.14f

    Is it works:

    Const TriggerBit:ULong=$200000000

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.