Created
February 25, 2010 16:19
-
-
Save gzmask/314682 to your computer and use it in GitHub Desktop.
golang strange syntax errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "os" | |
func main() { | |
file, _ := os.Open("list.txt", os.O_RDWR, 0644) | |
var b [40000] byte | |
file.Read(&b) | |
fmt.Print(len(&b)) | |
fmt.Print("\n") | |
file.Close() | |
os.Exit(0) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40000 | |
========= | |
while the file size for list.txt is 1562 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment