Timothy Willard wrote:
OMG, someone was trying to learn from my code! I'm not sure if I should be honoured or ashamed (I did some messy stuff in that post).
As I posted earlier, # is a type cheat. (read the Turing documentation for "cheat" if you want to know as much as possible)
cheat converts the bit representation of one type into another. Ex: the character 'a' has the bit representation 1100001 which is the same as the integer (or natural number) 97
# is a short form which converts to the nat type. If we specify a base in front of #, like in the case of B#N, then # will produce the nat with representation N in base B.
So # does not convert to the hexadecimal representation, 16#<hex> evaluates to the nat with hexadecimal representation <hex>.
AlsoTimothy Willard wrote:
is there anyway to get put to display in base 16?
Look up intstr and/or natstr.