Section6.54

This commit is contained in:
2023-10-04 14:55:12 +02:00
parent 39c8d853a5
commit 4e13ad8a10
3 changed files with 54 additions and 0 deletions

21
Section6/52.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"os"
"strconv"
)
func main() {
/* fmt.Println("os.Args", os.Args)
fmt.Println("Path:", os.Args[0])
fmt.Println("1st argument:", os.Args[1])
fmt.Println("2nd argument:", os.Args[2])
fmt.Println("No if items inside os.Args:", len(os.Args)) */
var results, err = strconv.ParseFloat(os.Args[1], 64)
fmt.Println(results)
fmt.Printf("%T\n", os.Args[1])
fmt.Printf("%T\n", results)
_ = err
}