while什么意思? 单片机C语言程序中:while(1)是什么意思呀?while...

while(1) \u4ec0\u4e48\u610f\u601d while(i--)\u4ec0\u4e48\u610f\u601d\uff1f

while(1)\u5176\u4e2d1\u4ee3\u8868\u4e00\u4e2a\u5e38\u91cf\u8868\u8fbe\u5f0f\uff0cwhile(1) \u8868\u793a\u65e0\u9650\u5faa\u73af\uff0c\u9664\u975e\u4f60\u8bbe\u7f6ebreak\u7b49\u7c7b\u4f3c\u7684\u8df3\u51fa\u5faa\u73af\u8bed\u53e5\u5faa\u73af\u624d\u4f1a\u4e2d\u6b62
while(i--)\u5176\u4e2di\u662f\u4e00\u4e2a\u53d8\u91cf\uff0c\u56e0\u6b64\u8868\u8fbe\u5f0fi--\u6709\u4e0d\u540c\u7684\u503c\uff0c\u4f9d\u6b21\u9012\u51cf\uff0ci--\u662f\u5148\u53d6\u503c\u540e\u51cf\uff0c--i\u5148\u52a0\u540e\u53d6\u503c,\u6240\u4ee5i--\u7684\u503c\u540c\u672a\u6267\u884c\u8be5\u81ea\u51cf\u8fd0\u7b97\u65f6\u7684i\u76f8\u7b49\u3002

\u6269\u5c55\u8d44\u6599\uff1awhile(1) \u8868\u793a\u65e0\u9650\u5faa\u73af\u3002
while\u7684\u8bed\u6cd5\u683c\u5f0f\u4e3a \uff1a
while(condition){//do something 1}//do something 2
condition \u4e3a\u5faa\u73af\u6761\u4ef6\uff0c\u6bcf\u6b21\u5224\u65adcondition\u662f\u5426\u4e3a\u771f\uff0c\u4e3a\u771f\u65f6\u6267\u884cwhile\u5faa\u73af\u4f53\u4e2d\u7684\u8bed\u53e5\u5757(\u4ee3\u7801\u4e2d\u57571)\uff1b\u4e3a\u5047\u65f6\u7ed3\u675f\u5faa\u73af\uff0c\u6267\u884c\u540e\u7eed\u8bed\u53e5\uff08\u4ee3\u7801\u4e2d\u57572\uff09\u3002
\u8fd9\u91cccondition\u4e3a1 \u8868\u793a\u6761\u4ef6\u6c38\u8fdc\u4e3a\u771f\uff0c\u4e00\u76f4\u6267\u884c\u5faa\u73af\u4f53\u5185\u8bed\u53e5\u3002\u4e3a\u4e86\u7ed3\u675f\u5faa\u73af\uff0c\u53ef\u4ee5\u5728\u5faa\u73af\u4f53\u5185\u6ee1\u8db3\u67d0\u4e9b\u7279\u5b9a\u6761\u4ef6\u4f7f\u7528break\u8df3\u51fa\u5faa\u73af\u3002
\u5982\u4e0b\uff1a
while(1){//do somethingif(condition){break;}}
\u53c2\u8003\u8d44\u6599\uff1a\u767e\u5ea6\u767e\u79d1-while

while(1)\u8868\u793a\u65e0\u9650\u5faa\u73af\u7684\u6267\u884c\u5b83{ }\u5185\u7684\u8bed\u53e5\uff0c\u5982\u679c\u5199\u6210while(2)\u3001while(3)\u7b49\u6548\u679c\u662f\u4e00\u6837\u7684\uff0c\u64cd\u4f5c\u65b9\u6cd5\u5982\u4e0b\uff1a
1\u3001\u9996\u5148\u65b0\u5efa\u4e00\u4e2a\u9879\u76ee\uff0c\u6dfb\u52a0\u5934\u6587\u4ef6\uff0c\u5982\u56fe\u6240\u793a\u3002

2\u3001\u63a5\u7740\u8f93\u5165main\u51fd\u6570\uff0c\u5982\u56fe\u6240\u793a\u3002


3\u3001\u7136\u540e\u5b9a\u4e49\u4e00\u4e2a\u6570\u7ec4(\u957f\u5ea6\u4e3a\uff1a5)\uff0c\u5982\u56fe\u6240\u793a\u3002

4\u3001\u63a5\u7740\u4f7f\u7528while\u5faa\u73af\u628a\u6570\u7ec4\u6253\u5370\u51fa\u6765\uff0c\u5982\u56fe\u6240\u793a\u3002

5\u3001\u7136\u540e\u5728\u952e\u76d8\u4e0a\uff0c\u6309\u5feb\u6377\u952eF5\u8fd0\u884c\u7a0b\u5e8f\uff0c\u6253\u5370\u51fa\u7ed3\u679c\uff0c\u5982\u56fe\u6240\u793a\uff0c\u5c31\u5b8c\u6210\u4e86\u3002

while 

中文释义:

1、conj. 在……期间;在……的过程中;与……同时;(对比两件事物)……而;虽然,尽管;直到……为止

2、n. 一段时间;(诗、文)在此期间

3、adv. 在……时候

4、v. 消磨(时间)

5、prep. 直到

英文读音:英 [waɪl]  美 [waɪl]

短语

1、Short while 不一会

2、DO WHILE 循环 ; 循环语句 ; 条件循环

3、While they 今朝有酒今朝醉

4、While doing 正在做某事 ; 是一个省略形式 ; 两者同时发生

扩展资料: 

while的近义词

although

英文读音:英 [ɔːlˈðəʊ]  美 [ɔːlˈðoʊ] 

中文释义:conj. 尽管,虽然;但是,然而

一、短语

1、Although I 即使我 ; 就算这样我也

2、although if 虽然如果 ; 但如果

3、Although exhausted 虽然筋疲力尽

二、例句

Although he worked hard, he failed in the exam. 

虽然他很努力,但他考试没有及格。



while
n.
时间; 一段时间, 一会儿

Wait a while.
等一会儿。
It took a long while to do the work.
做这个工作花了许多时间。
What have you been doing all this while?
这一阵子你一直在做什么?

习惯用语
a good [long, great] while 长[许]久
a little while 不久, 一会儿
a while ago 方才, 刚才
after a while不久, 过一会儿
all the while 始终, 一直
at whiles 有时, 时常
between whiles 间或, 时或
every little while (=at whiles) 有时, 时常
for a [one] while 暂时
in a little while 不久, 没一会儿
make it worth sb.'s while 酬谢某人, 贿赂某人
the while [whilst] (与此)同时, 在此期间
while you are about it [口]顺便, 在你做这个的同时
worth (one's) while 值得的; 值得花费时间, 值得一干; 有益的

牛津高阶英汉双解词典

while 1
/ waɪl; US hwaɪl; hwaɪl/ n [sing]
(period of) time (一段)时间: She worked in a bank for a while before studying law. 她学法律之前在银行工作过一段时间. * For a long while we had no news of him. 很长一段时间我们没有他的消息. * I'll be back in a little while, ie soon. 我一会儿就回来. * It took quite a while (ie a long time) to find a hotel. 很长时间才找到一家旅馆. * We waited for three hours, all the while hoping that someone would come and fetch us. 我们等候了三个小时, 一直希望能有人来接我们.
(idm 习语) once in a while => once. worth sb's while => worth.
> while v (phr v) while sth away pass (a period of time) in a leisurely way 逍遥自在地度过(一段时间): We whiled away the time at the airport reading magazines. 我们在机场阅读杂志消磨时间. * It's easy to while a few hours away in a museum. 在博物馆里很容易打发掉几个小时.

while 2
/ waɪl; US hwaɪl; hwaɪl/ (also whilst / waɪlst; US hwaɪlst; hwaɪlst/) conj
(a) during the time that; when 在...期间; 当...的时候: He fell asleep while (he was) doing his homework. 他做着做着功课就睡着了. * While I was in Madrid there was a carnival. 我在马德里的时候正赶上狂欢节. * While (locked up) in prison, she wrote her first novel. 她在狱中写出了第一部小说. (b) at the same time as 与...同时: While Mary was writing a letter, the children were playing outside. 玛丽写信时孩子都在外面玩儿. * He listens to the radio while driving to work. 他去上班一边开着车一边听音乐. * I lived in a hostel while I was a student. 我求学期间住在青年招待所里.
(used to show a contrast 用以表示对比或相反的情况): I drink black coffee while he prefers it with cream. 我爱喝清咖啡而他喜欢加奶油的. * English is understood all over the world while Turkish is spoken by only a few people outside Turkey itself. 英语世界通行, 但土耳其语离开本国就很少有人说了.
(fml 文) although 虽然: While I admit that there are problems, I don't agree that they cannot be solved. 尽管我承认有问题存在, 但我不同意说这些问题不能解决.牛津高阶英语词典

有时有比较的意思,相当于“然而”之类。有点类似于when,不过要表示一段时间发生的事,而when是瞬间的动作。

真全面啊
我总结就是 当时间讲的时候 是连词 作“当”讲,与when的区别是 前者表示一段时间 后者表示点时间
当名词讲的时候 指一段时间 比如for a while :一会儿
还当然而讲 表示转折 He likes football while i like basketball.

  • while 浠涔堟剰鎬
    绛旓細while [(h)wail]n.涓浼氬効, 鏃堕棿 conj.褰...鐨勬椂鍊, 铏界劧 vt.娑堢( prep.<鍙><鏂>鐩村埌
  • while鏄浠涔堟剰鎬
    绛旓細while鑻盵waɪl]缇嶽hwaɪl, waɪl]conj.鑰; 铏界劧; 鍦ㄢ︽湡闂; 涓庘﹀悓鏃;n.鏃堕棿锛堜竴娈碉級;vt.娑堢(锛屾墦鍙戯紙鏃堕棿锛; 锛堟剦蹇屾噿鏁e湴锛夊害杩囷紙鏃堕棿锛夛紙甯镐笌 away 杩炵敤锛;[渚嬪彞]Maybe I could listen to an instructional tape while jogging ?鎴栬鎴戝彲浠ュ湪鎱㈣窇鐨勫悓鏃跺惉鏁欏褰曢煶甯...
  • while鏄浠涔堟剰鎬
    绛旓細绗竴绉鎰忔{涓浼氬効} 绗簩绉嶆剰鎬漿浠涔堢殑鏃跺檥 绗笁绉嶆剰鎬漿铏界劧 浣嗘槸} 绗洓绉嶆剰鎬漿娑堢(}
  • while鐨涓夌鎰忔 while鐨勪笁绉嶆剰鎬濇槸浠涔
    绛旓細1銆佹剰涓衡滃綋鈥︹︽椂鍊欙紝鍜屸︹﹀悓鏃垛濓紝寮曞鏃堕棿鐘惰浠庡彞銆備緥濡傦細While I was watching TV锛宼he bell rang銆傦紙鎴戠湅鐢佃鏃讹紝閾冨搷浜嗐傦級Tom watched TV while she ate her supper銆傦紙姹ゅ杈瑰悆鏅氶キ杈圭湅鐢佃銆傦級2銆佹剰涓衡滆櫧鐒讹紝灏界鈥濓紝寮曞璁╂鐘惰浠庡彞銆備緥濡傦細While it was late锛宧e went on ...
  • while浠涔堟剰鎬,鎬庝箞鐢
    绛旓細1.浣滆繛璇嶄腑鐨寮曞璇嶏紝鎰忎负褰撯︽椂锛屽紩瀵兼椂闂寸姸璇粠鍙ワ紝鍚庢帴寤剁画鎬у姩璇嶃2.浣滃彲鏁板悕璇嶏紝鎰忎负涓浼氬効锛屽父鐢ㄨ瘝缁:after a while锛岃繃浜嗕竴浼氬効銆
  • 楂樹腑鑻辫 杩欓噷鐨 While浠涔堟剰鎬?
    绛旓細while鏈夌偣绛夊悓浜巜hen浣嗗惈鏈夆滅劧鑰屸鐨勬剰鎬銆傛鍙ヤ腑鏂囩殑鎰忔濇槸:闅忕潃澶澶鐨勫か濡诲彉寰楄秺鏉ヨ秺鍒嗙鐨勫悓鏃讹紝鑰屾垜浠鍦ㄥ彉寰楄秺鏉ヨ秺绱у瘑銆傚笇鏈涢噰绾筹紒
  • while浠涔堟剰鎬
    绛旓細褰撱傘傜殑鏃跺欙紱涔熸湁杞姌鐨勬剰鎬銆
  • while鐨勬剰鎬鏄粈涔?
    绛旓細while鐨鐢ㄦ硶鍥涚鍙ュ瀷鍙鎰忔濡備笅锛歸hile鐢ㄦ硶1锛歐hile浣滀负骞跺垪杩炶瘝锛屾剰鎬濅负鈥滆岋紝鐒惰屸濓紝琛ㄥ墠鍚庢剰涔変笂鐨勫姣旀垨杞姌銆備緥濡傦細There鈥檚 plenty of rain in the southeast,while there's little in the northeast銆備笢鍗楅儴闆ㄩ噺鍏呰冻锛岃岃タ鍖楅儴鍒欏緢灏戜笅闆ㄣ係ome people waste food while others haven't enough銆...
  • while浠涔堟剰鎬
    绛旓細瀹冨拰C璇█涓鐨剋hile琛ㄧ幇寰椾竴鏍枫俤o...while寰幆鏄痺hile寰幆鐨勫彉绉嶃傝寰幆绋嬪簭鍦ㄥ垵娆¤繍琛屾椂浼氶鍏堟墽琛屼竴閬嶅叾涓殑浠g爜锛岀劧鍚庡綋鎸囧畾鐨勬潯浠朵负true鏃讹紝瀹冧細缁х画杩欎釜寰幆銆傛墍浠ュ彲浠ヨ繖涔堣锛宒o...while寰幆涓烘墽琛岃嚦灏戜竴閬嶅叾涓殑浠g爜锛屽嵆浣挎潯浠朵负false锛屽洜涓哄叾涓殑浠g爜鎵ц鍚庢墠浼氳繘琛屾潯浠堕獙璇併
  • while 鏄浠涔堟剰鎬 鍒氬缂栫▼?
    绛旓細鍦–璇█涓紝while寰幆鐨勬牸寮忔槸锛歸hile(琛ㄨ揪寮忥級{ 璇彞缁勶紱} 鍏朵腑锛氳〃杈惧紡涓鑸娇鐢ㄩ昏緫鎴栧叧绯昏〃杈惧紡锛涜鍙ョ粍鐢变竴涓垨澶氫釜璇彞缁勬垚锛屼篃鍙惊鐜綋銆傚綋鍙湁涓鍙ュ惊鐜綋鏃讹紝鑺辨嫭鍙峰彲浠ョ渷鐣ャ傚畠鐨勫惈涔鏄厛鍒ゆ柇琛ㄨ揪寮忕殑鍊硷紝濡傛灉琛ㄨ揪寮忕殑閫昏緫鍊间负鐪燂紝灏辨墽琛屼竴閬嶈鍙ョ粍锛屽啀鍥炲ご杩愮畻琛ㄨ揪寮忕殑鍊硷紝濡傛灉涓虹湡锛屽啀杩愯涓閬...
  • 扩展阅读:c语言while语句用法 ... while 1 为什么只循环一次 ... 初中when和while图解 ... while的用法归纳总结 ... while的七个意思 ... while0会怎么样 ... while引导的三种时态 ... 程序中while 1 是什么意思 ... while引导的三种用法 ...

    本站交流只代表网友个人观点,与本站立场无关
    欢迎反馈与建议,请联系电邮
    2024© 车视网