coolpay64 发表于 2007-9-14 22:20:53

所說的error不是在說邏輯上的錯,而是syntax error,語法錯語,也就是說,break只會向上找loop 相關,跟if完全無關,而這才是重點

kurai 发表于 2007-9-15 00:18:59

No, logically it is wrong. the If statement is not a loop. It cannot be broken.

Break in a if statement is used for breaking the outer loop, not to break the if statememnt. That's why if we used break, it will get out form the big for-loop. Because the if is inside the for loop so the next command will not run.

coolpay64 发表于 2007-9-15 08:49:36

kurai自己抄上面的Code,仔細看一次,用G++ compile一次,看看啥是Syntax error

kurai 发表于 2007-9-15 09:59:18

I understand what you mean =w=.
Or my English is not comprehensible?

coolpay64 发表于 2007-9-15 10:07:39

絕對是英文的問題,中國人還是用中文。。。。

august 发表于 2007-9-15 11:05:17

最讨厌人卖弄E文.........
因为偶不懂

shawind 发表于 2007-9-15 11:30:34

大概是机子上没有中文输入法吧,可以去找个基于web的输入法临时用着.
如 http://www.inputking.com/

coolpay64 发表于 2007-9-15 12:08:01

他不是沒有中文輸入法,只是懶得不用中文輸入法

kurai 发表于 2007-9-16 22:39:31

DELETE

kurai 发表于 2007-9-16 22:40:05

対不 起、私的中文 不好い、

我的結論は是、有LOOP時、BREAK会立即離れ開LOOP、不論有無いIF在裏面。
页: 1 [2] 3
查看完整版本: 关于if.....else