Hex2 - my little calculator
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    Hex2 is a little calculator I wrote long time before, mainly for coder and scientist (so... me :-P)
    it supports variables and have now a simple MUI GUI.



    More Informations and Download: https://blog.alb42.de/2018/11/09/full-hex2-mui-port/

    Have Fun.
  • »09.11.18 - 19:11
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    KennyR
    Posts: 422 from 2003/3/4
    From: #AmigaZeux, Gu...
    Well done. Anything that supports BODMAS and algebra is well worth having. Hex2 is the kind fo tool I'd have killed for when I was at high school.

    Yeah, most people won't comment, but don't let that put you off. Tools like this are the kind of thing you never need... until you need them. Then you really need them.

    Now get it to solve polynomials...
    (just kidding :)
  • »10.11.18 - 15:38
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    Thanks,

    I use it a lot (for Linux/Windows), its useful for programming ;) when you often have to deal with hexadecimal and binary numbers. For SPI/I2C communications a bit shift of your result only can be noticed with such a tool ;)
  • »10.11.18 - 17:17
    Profile Visit Website
  • MorphOS Developer
    cyfm
    Posts: 377 from 2003/4/11
    From: Germany
    Well done.
    Now add some modulo function that isn't limited to 32 bit integers and you could even calculate IBAN checksums with it :)
  • »10.11.18 - 17:36
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    cyfm: the problem is not the 32bit integer the problem all internal calculations are done with extended or double floats which is not exact enough to do IBAN mod ;)
  • »10.11.18 - 18:22
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    little update from wishes and reports

    Hex2 Version 0.2

    new:
    - added swap() - swap endianess
    - integer division '\' and integer modulo '%'
    - Overflow bugfixes





    https://blog.alb42.de/2018/11/11/hex2-0-2/
  • »11.11.18 - 09:23
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 312 from 2003/2/24
    From: Berlin
    Nice!

    Two little bugs, the upper listview always jumps to the top and the string gadget isn't in the CycleChain.
  • »11.11.18 - 12:31
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    thanks for feedback.

    are you sure? for me it always jumps to end ... at every input

    I do a MH_Set(Obj, MUIA_Prop_First, MaxInt); after every new line added which seems to work nicely in MorphOS 3.11 and 68k MUI 3.8

    Yes, I forget about the cycle chain, I will add it next time.
  • »11.11.18 - 13:23
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 312 from 2003/2/24
    From: Berlin
    Here is a short video showing it.

    Why don't you use MUIA_List_First?
  • »11.11.18 - 14:03
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    strange...

    hmm ok I changed to it (not worth to make a new version number) could you download it again and see if it makes any difference (the cycle chain should also work)
  • »11.11.18 - 14:44
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 312 from 2003/2/24
    From: Berlin
    Thanks, now it works!

    But now the Clear button isn't anymore in the cycle chain;)
  • »11.11.18 - 15:42
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 312 from 2003/2/24
    From: Berlin
    There is also a hit if the Hex2.ini file couldn't be written!
    F.e. if you start Hex2 from inside the archive!
  • »11.11.18 - 15:52
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2015/3/31
    Fixed both.
    Thanks for the reports.

    The crash is a little bit bad... not sure how this can happen, I have no way to check that... usually a exception should happen there... so somehow I got a handle on this ini file but then a crash when try to write it. hmm,
  • »11.11.18 - 17:28
    Profile Visit Website