Better welcome

This commit is contained in:
Brian Buller 2019-03-06 14:48:15 -06:00
parent d9fbebffdd
commit 3614039716

View File

@ -40,7 +40,7 @@ func divideOp(v1, v2 float64) float64 {
} }
func main() { func main() {
fmt.Println("vim-go") fmt.Println("stack calculator")
var in string var in string
reader := bufio.NewReader(os.Stdin) reader := bufio.NewReader(os.Stdin)
for { for {
@ -63,7 +63,7 @@ func main() {
val, err := strconv.ParseFloat(in, 64) val, err := strconv.ParseFloat(in, 64)
if err != nil { if err != nil {
fmt.Println(err.Error()) fmt.Println(err.Error())
fmt.Println("Valid inputs: +, -, /, *, <float>") fmt.Println("Valid inputs: +, -, /, *, <number>")
fmt.Println("'.' by itself to quit") fmt.Println("'.' by itself to quit")
} else { } else {
push(val) push(val)