Cool idea! Clear and nicely organized too :)
Wouldn’t it be more readable and less error-prone to have separate commands for turning hex mode on and off? Such as `hex on` and `hex off`?
Wouldn’t it be more readable and less error-prone to have separate commands for turning hex mode on and off? Such as `hex on` and `hex off`?
Edit: What I mean is
hex
00
dec
00
utf8
00As far as I could tell it's been more or less the only mode. At that point I'd probably get rid of it because global state (which modes are) has to be remembered at all times and in this case its invisible until you see output. The suggestion to use different operators or modifiers for a single numbers was a good one in that direction IMO.
if ...
hex off
endifThe only other thing I could see being useful is the ability to define "structs", for binary-headers, etc.
But agreed, this is a neat tool.