mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-17 12:31:04 +01:00
added:
- converters - bitwise operators - hex input and output support
This commit is contained in:
@@ -117,6 +117,15 @@ func (c *Calc) SetCommands() {
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
"hex": NewCommand(
|
||||
"show last stack item in hex form (converted to int)",
|
||||
func(c *Calc) {
|
||||
if c.stack.Len() > 0 {
|
||||
fmt.Printf("0x%x\n", int(c.stack.Last()[0]))
|
||||
}
|
||||
},
|
||||
),
|
||||
}
|
||||
|
||||
c.StackCommands = Commands{
|
||||
|
||||
Reference in New Issue
Block a user