compute

package
v0.0.0-...-77daf57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2018 License: MIT Imports: 8 Imported by: 20

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL