Better welcome
This commit is contained in:
parent
d9fbebffdd
commit
3614039716
4
main.go
4
main.go
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user