remove unused DIVMOD builtin
This commit is contained in:
parent
953764004d
commit
5048b445ae
17
builtins.go
17
builtins.go
@ -258,23 +258,6 @@ func (b *Builtins) Mod(s *Stack) func() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DivMod performs NOS/TOS & NOS%TOS and pushes the (integer!) results: TOS as quotient, NOS as remainder
|
|
||||||
func (b *Builtins) DivMod(s *Stack) func() error {
|
|
||||||
return func() error {
|
|
||||||
tos, err := s.Pop()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
nos, err := s.Pop()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
s.Push(nos % tos)
|
|
||||||
s.Push(nos / tos)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Print pops the stack and outputs it to the writer with a trailing space (defaults to stdout)
|
// Print pops the stack and outputs it to the writer with a trailing space (defaults to stdout)
|
||||||
func (b *Builtins) Print(out io.Writer, s *Stack) func() error {
|
func (b *Builtins) Print(out io.Writer, s *Stack) func() error {
|
||||||
if out == nil {
|
if out == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user