@Frank: Point taken. However, since Flume strives to allow the user to easily mix numbers in different formats, it's not trivial to know what to display. I can come up with a method to handle your case. I don't know if I can come up with a way to consistently handle all permutations of the allowed number formats for the binary operations and functions and not confuse or misplease somebody. For example:
0b0101 * 0xFF = 0b101110101001? 0xBA9?? 2985?
2.4e1 - 3.0 = 1.7e1? 17.0? 17?
I can go on. I hope you appreciate this will require a fairly sophisticated approach.
I've been busy with Fluff for the new TC 3.3 release
But when I can get back to Flume, I think I will try to implement something like:
The number formats have a priority, and the result of a binary operation will generally be the higher priority of the two operands. In some operations like division, inspection of the result may promote the result's format to a higher priority (e.g. the result of 10 / 3 won't be integer, it will be promoted to a real: 3.33333333). In your example, since one of the operands is real, the result will be real.
Then to allow the user to see the result in alternative formats, I may introduce new syntax:
10 + 5.0 as hex = 0x0F
1.23e1 - 0.21e1 as real = 10.2
The "as" word may just be syntactic sugar, perhaps it can be optional.
The post-fix functions like "hex" and "real" force the result to the format implied by the name.
There may be different expectations for the integer format function on whether they would round or not, and if not, should the truncation be always toward zero or toward neg. infinity ("floored"). Poll ten users and I bet you'd get at least two supporters for each of these "convert to integer" methods. So maybe I need some more syntax: "as rounded int" or "as floored hex". Maybe I need to have integer length options too: "as floored dword hex". You can see it's growing more complicated.
Several calculator apps have display option settings (checkboxes or radio buttons) for this stuff, which is fine when you can only see one result at a time, but I want Flume to be more of a scratchpad, like a one-column spreadsheet. So I will probably bite the bullet and implement the "as ..." syntax. Most of the time, people won't need it and will get results more in keeping with what they expect, but the option will be there for the times they want to see results different ways. Hopefully, adding this syntax won't hurt too bad in terms of code size.
No promise on when I'll get to this. If Fluff does not generate too many bug reports, I may get back to Flume before the end of the year.