This commit is contained in:
Unknown
2013-06-22 21:29:42 +08:00
parent fac2467441
commit 67be80ca8c
120 changed files with 506 additions and 7307 deletions

View File

@@ -0,0 +1,17 @@
// multiple_for.go
package main
import "fmt"
func main() {
//multiple initialization; a consolidated bool expression with && and ||; multiple incrementation
for i, j, s := 0, 5, "a"; i < 3 && j < 100 && s != "aaaaa"; i, j, s = i+1,
j+1, s + "a" {
fmt.Println("Value of i, j, s:", i, j, s)
}
}
/* Output:
Value of i, j, s: 0 5 a
Value of i, j, s: 1 6 aa
Value of i, j, s: 2 7 aaa
*/