Hi all, Wondering if the 'expression' part of an if-statement should be in one line only, given the following case, 'go tool compile' will report a syntax error
Enter code here... package p func cf1() int { return 0 } func cf2() int { return 10 } func f() { *if cf2() - 1* * < cf1()* { println("tested") } } ss.go:13:3: syntax error: unexpected <, expecting expression Guess there might be syntax specification rules but I failed to find out. Thanks a lot. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6887bd7f-5344-47b6-91ad-2960d2f67b33o%40googlegroups.com.