while的用法可从下述几点理解与运用.
一、while意为\“当.时候\“,指一段时间,不能用来表示一个时间点.
While the discussion was still going on,George came in.当讨论还在进行时,乔治走了进来.
二、while意为\“而;然而\“,表示转折.
There\’re plenty of rain in the southeast,while there\’s little in the northeast.东南部雨量充足,而西北部则很少下雨.
三、while意为\“虽然;尽管\“,表示让步.
While I admit his good points,I can see his shortcomings.尽管我承认他的优点,但我还是能看到他的缺点.
四、while意为\“只要\“,表示条件.
We can surely overcome these difficulties while we are closely united.只要我们紧密地团结一致,一定能克服这些困难.
五、while从句中的省略.
当while从句中的主语与主句的主语一致,且含有be的某种形式时,从句中的主语连同be可同时省略.
While listening to the radio,she fell asleep.她在听收音机时睡着了.
While in London,he studied music and painting.在伦敦时,他学习音乐和绘画.
六、while可用作名词,意为\“一会儿;一段时间\“.
作名词用时,主要用于短语中:after a while \“过了一会儿\“; all the while \“一直,始终\“; a short / little while ago \“刚才\“; once in a while \“偶尔,间或\“; wait / rest(for) a while \“等 / 休息一会儿\“.
I haven\’t seen her for a long while.我好久没有看见她了.
Where have you been all this while?这一阵子你到哪去了?
He usually goes to work by bike,but once in a while he goes by bus.他通常骑自行车上班,但偶尔也乘公共汽车.
I looked everywhere for the letter,but it was in my pocket all the while.我到处找那封信,却不知它一直在我口袋里.
七、while与when以及as之间的区别.
1.当从句中的谓语动词是持续性的动作时,我们可以用while,when或as.
While / When / As I was walking down the street,I noticed a police car in front of the bank.我顺着马路往前走时,发现银行门前停着一辆警车.
2.当从句中的谓语动词表示瞬间动作时,不可用while.
He was on the point of leaving when someone knocked at the door.他正要走,这时有人敲门.
3.如果谈论两个长动作,最常用的是while.
While John was sitting biting his nails,I was working out a plan to get us home.约翰坐在那里咬指甲时,我想出了一个回家的办法.
不过,as是可以用来说明两种正在发展或变化的情况的,这时as引导一个持续性的动作,主句中的动作与之同时进行.
As we talked on,he got more and more excited.我们继续往下谈的时候,他越来越兴奋.
4.如果表示两个短动作或事件同时发生,最常用的是as或just as,也可用when.
Just as he caught the ball,there was a tearing sound.当他抓住球的时候,有一种撕裂的声音.
I thought of it just when you opened your mouth.就在你要说话的时候,我也想到了.
1、while作名词用,表示“一会儿”、“一段时间”。
2、while作连词用,表示“引导时间状语”。
3、while作并列连词用,意思为“而,然而”。
4、while表示对比关系时,意思是“而,然而”,不能放句首。
5、while用作连词时,表示“在…(过程)中,在…期间”。常用来引导时间状语从句,当主句的主语和while所引导的从句的主语一致时,while从句中的主语、谓语往往可以省去。
while的意思是:在……期间;在……的过程中。
读音:英
conj. 在……期间;在……的过程中;与……同时;(对比两件事物)……而;虽然,尽管;直到……为止
n. 一段时间;(诗、文)在此期间
adv. 在……时候
v. 消磨(时间)
prep. 直到
相关短语:
once in a while 偶尔 ; 偶然 ; 间或 ; 有时
for a while 暂时 ; 一会儿 ; 一时 ; 一段时间
while away 消磨 ; 消磨时间 ; 浪费时间 ; 时间
While You Were Sleeping 我的酒鬼女友 ; 再见钟情 ; 当你沉睡时
while循环是计算机的一种基本循环模式。当满足条件时进入循环,进入循环后,当条件不满足时,跳出循环。
while语句的一般表达式为:while(表达式){循环体}。
典型循环:
WHILE 《条件》
《语句体》
end while
do while 《条件》
《语句体》
loop
JavaScript中while循环的语法如下:
while (《条件》) {需执行的代码 };
do {需执行的代码 } while (《条件》);
注意:do...while 循环是 while 循环的变种。该循环程序在初次运行时会首先执行一遍其中的代码,然后当指定的条件为 true 时,它会继续这个循环。
所以可以这么说,do...while 循环为执行至少一遍其中的代码,即使条件为 false,因为其中的代码执行后才会进行条件验证。
姓名:
年龄:
电话: