quote:
Originally posted by Mattike
quote:
Originally posted by phalanxii
In the QC, I can't quite use the letters (A-F) for hex, because the calculator doesn't parse them.
I am aware of this. They were just meant to note that you will be able to use hexadecimal values, but not by simply typing them. I'll make the script to use special functions to let the user specify what mode should be used. For example, I'll make Hex(FF) to result in 255, so you can calculate with different modes. (e.g.: substracting hexadecimal numbers from binary numbers and returning the octal result)
do as JScript does (and other languages) add a prefix to the numbers instead of creating extra functions:
eg:
0x?? for binary numbers
or
h01DF4B,
o1472,
b0110, etc
it is a lot easier/shorter to write:
/calc
h01DF4B +
h412F
than:
/calc Hex(01DF4B) + Hex(412F)
Also, using the function Hex() like Hex(FF) doesn't make sense when you compare it to how such functions work in other languages and stuff. Hex() is to convert something to a hex number, not vice versa. Just like Cos() is used to calculate the cosinus not to convert a cosinus to something else.
And then you could still use those extra functions, but to change the output to some base. which would be more logical IMHO. eg:
/calc Oct(
h01DF4B +
b110110)