- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ExamplePrint (0.24 sec)
-
src/go/ast/example_test.go
// src.go:3:11: 1.0 // src.go:4:5: X // src.go:4:9: f // src.go:4:11: 3.14 // src.go:4:17: 2 // src.go:4:21: c } // This example shows what an AST looks like when printed for debugging. func ExamplePrint() { // src is the input for which we want to print the AST. src := ` package main func main() { println("Hello, World!") } ` // Create the AST by parsing src.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/fmt/example_test.go
n, err := fmt.Sscanf("Kim is 22 years old", "%s is %d years old", &name, &age) if err != nil { panic(err) } fmt.Printf("%d: %s, %d\n", n, name, age) // Output: // 2: Kim, 22 } func ExamplePrint() { const name, age = "Kim", 22 fmt.Print(name, " is ", age, " years old.\n") // It is conventional not to worry about any // error returned by Print. // Output: // Kim is 22 years old. }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 21:03:10 UTC 2019 - 11.8K bytes - Viewed (0)