找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
楼主: august

[通用编程] 关于if.....else

[复制链接]
发表于 2007-9-14 22:20:53 | 显示全部楼层
所說的error不是在說邏輯上的錯,而是syntax error,語法錯語,也就是說,break只會向上找loop 相關,跟if完全無關,而這才是重點
发表于 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.
发表于 2007-9-15 08:49:36 | 显示全部楼层
kurai自己抄上面的Code,仔細看一次,用G++ compile一次,看看啥是Syntax error
发表于 2007-9-15 09:59:18 | 显示全部楼层
I understand what you mean =w=.
Or my English is not comprehensible?
发表于 2007-9-15 10:07:39 | 显示全部楼层
絕對是英文的問題,中國人還是用中文。。。。
 楼主| 发表于 2007-9-15 11:05:17 | 显示全部楼层
[s:5] 最讨厌人卖弄E文.........
[s:6] 因为偶不懂
发表于 2007-9-15 11:30:34 | 显示全部楼层
大概是机子上没有中文输入法吧,可以去找个基于web的输入法临时用着.
如 http://www.inputking.com/
发表于 2007-9-15 12:08:01 | 显示全部楼层
他不是沒有中文輸入法,只是懶得不用中文輸入法
发表于 2007-9-16 22:39:31 | 显示全部楼层
DELETE
发表于 2007-9-16 22:40:05 | 显示全部楼层
対不 起、私的中文 不好い、

我的結論は是、有LOOP時、BREAK会立即離れ開LOOP、不論有無いIF在裏面。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|幻想森林

GMT+8, 2026-11-6 18:26 , Processed in 0.009556 second(s), 13 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表