Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearHistory

func ClearHistory()

    ClearHistory removes prior evaluation history used for @ references.

    func Evaluate

    func Evaluate(in string) (float64, error)

    Types

    type FloatStack

    type FloatStack struct {
    	Slice []float64
    	Pos   int
    }

    func NewFloatStack

    func NewFloatStack() *FloatStack

    func (*FloatStack) Pop

    func (s *FloatStack) Pop() (float64, error)

    func (*FloatStack) Push

    func (s *FloatStack) Push(a float64)

    func (*FloatStack) Top

    func (s *FloatStack) Top() (float64, error)

    type StringStack

    type StringStack struct {
    	Slice []string
    	Pos   int
    }

    func NewStringStack

    func NewStringStack() *StringStack

    func (*StringStack) Pop

    func (s *StringStack) Pop() (string, error)

    func (*StringStack) Push

    func (s *StringStack) Push(a string)

    func (*StringStack) SafePop

    func (s *StringStack) SafePop() string

    func (*StringStack) SafeTop

    func (s *StringStack) SafeTop() string

    func (*StringStack) Top

    func (s *StringStack) Top() (string, error)