for和to的用法

for和to的用法

For:there is make buy get show

To: give help

Pass...for..

冒充;被当作

He passes for a doctor.

他冒充医生。

He passes for a learned man.

他被误认为是个有学问的人。

take...for....

有好几个意思,最基本的有花费时间,钱等,另外还有把。。。当做。。。。的意思。

例如:1.it takes me 20 dollars for the bag.

2.I took 20 dollars for the bag.

3.who did you take me for? a idiot?

take sth to a place 把。。。带到某地

of与for的用法以及区别

of与for的用法以及区别 for 表原因、目的 of 表从属关系 介词of的用法 (1)所有关系 this is a picture of a classroom (2)部分关系 a piece of paper a cup of tea a glass of water a bottle of milk what kind of football,American of soccer? (3)描写关系 a man of thirty 三十岁的人 a man of shanghai 上海人 (4)承受动作 the exploitation of man by man.人对人的剥削。 (5)同位关系 It was a cold spring morning in the city of London in England. (6)关于,对于 What do you think of Chinese food? 你觉得中国食品怎么样? 介词 for 的用法小结 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。What will we have for supper? 我们晚餐吃什么?

2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 Thank you for your last letter. 谢谢你上次的来信。 Thank you for teaching us so well. 感谢你如此尽心地教我们。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning. 我早晨通常跑步一小时。We will stay there for two days. 我们将在那里逗留两天。 5. 表示去向、目的,意为“向、往、取、买”等。如: let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。

for 的用法

for的用法 1.表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2.表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 Thank you for your last letter. 谢谢你上次的来信。 Thank you for teaching us so well. 感谢你如此尽心地教我们。 3.表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4.表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning.我早晨通常跑步一小时. We will stay there for two days.我们将在那里逗留两天. 5.表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk.我们出去散步吧。 I came here for my schoolbag. 我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6.表示所属关系或用途,意为“为、适于……的”.如: It’s time for school.到上学的时间了。 Here is a letter for you.这儿有你的一封信。 7.表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8.用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。

to与for的用法和区别

to与for的用法和区别 一般情况下, to后面常接对象; for后面表示原因与目的为多。 Thank you for helping me. Thanks to all of you. to sb.表示对某人有直接影响比如,食物对某人好或者不好就用to; for表示从意义、价值等间接角度来说,例如对某人而言是重要的,就用for. for和to这两个介词,意义丰富,用法复杂。这里仅就它们主要用法进行比较。 1. 表示各种“目的” 1. What do you study English for? 你为什么要学英语? 2. She went to france for holiday. 她到法国度假去了。 3. These books are written for pupils. 这些书是为学生些的。 4. hope for the best, prepare for the worst. 作最好的打算,作最坏的准备。 2.对于 1.She has a liking for painting. 她爱好绘画。 2.She had a natural gift for teaching. 她对教学有天赋/ 3.表示赞成同情,用for不用to. 1. Are you for the idea or against it? 你是支持还是反对这个想法? 2. He expresses sympathy for the common people.. 他表现了对普通老百姓的同情。 3. I felt deeply sorry for my friend who was very ill. 4 for表示因为,由于(常有较活译法) 1 Thank you for coming. 谢谢你来。 2. France is famous for its wines. 法国因酒而出名。 5.当事人对某事的主观看法,对于(某人),对…来说(多和形容词连用)用介词to,不用for.. He said that money was not important to him. 他说钱对他并不重要。 To her it was rather unusual. 对她来说这是相当不寻常的。 They are cruel to animals. 他们对动物很残忍。 6.for和fit, good, bad, useful, suitable 等形容词连用,表示适宜,适合。 Some training will make them fit for the job. 经过一段训练,他们会胜任这项工作的。 Exercises are good for health. 锻炼有益于健康。 Smoking and drinking are bad for health. 抽烟喝酒对健康有害。 You are not suited for the kind of work you are doing. 7. for表示不定式逻辑上的主语,可以用在主语、表语、状语、定语中。 1.It would be best for you to write to him. 2.The simple thing is for him to resign at once. 3.There was nowhere else for me to go. 4.He opened a door and stood aside for her to pass.

常用介词用法(for to with of)

For的用法 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning. 我早晨通常跑步一小时。 We will stay there for two days. 我们将在那里逗留两天。 5. 表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。 尽管for 的用法较多,但记住常用的几个就可以了。 to的用法: 一:表示相对,针对 be strange (common, new, familiar, peculiar) to This injection will make you immune to infection. 二:表示对比,比较 1:以-ior结尾的形容词,后接介词to表示比较,如:superior ,inferior,prior,senior,junior 2: 一些本身就含有比较或比拟意思的形容词,如equal,similar,equivalent,analogous A is similar to B in many ways.

(完整版)介词for用法归纳

介词for用法归纳 用法1:(表目的)为了。如: They went out for a walk. 他们出去散步了。 What did you do that for? 你干吗这样做? That’s what we’re here for. 这正是我们来的目的。 What’s she gone for this time? 她这次去干什么去了? He was waiting for the bus. 他在等公共汽车。 【用法说明】在通常情况下,英语不用for doing sth 来表示目的。如: 他去那儿看他叔叔。 误:He went there for seeing his uncle. 正:He went there to see his uncle. 但是,若一个动名词已名词化,则可与for 连用表目的。如: He went there for swimming. 他去那儿游泳。(swimming 已名词化) 注意:若不是表目的,而是表原因、用途等,则其后可接动名词。(见下面的有关用法) 用法2:(表利益)为,为了。如: What can I do for you? 你想要我什么? We study hard for our motherland. 我们为祖国努力学习。 Would you please carry this for me? 请你替我提这个东西好吗? Do more exercise for the good of your health. 为了健康你要多运动。 【用法说明】(1) 有些后接双宾语的动词(如buy, choose, cook, fetch, find, get, order, prepare, sing, spare 等),当双宾语易位时,通常用for 来引出间接宾语,表示间接宾语为受益者。如: She made her daughter a dress. / She made a dress for her daughter. 她为她女儿做了件连衣裙。 He cooked us some potatoes. / He cooked some potatoes for us. 他为我们煮了些土豆。 注意,类似下面这样的句子必须用for: He bought a new chair for the office. 他为办公室买了张新办公椅。 (2) 注意不要按汉语字面意思,在一些及物动词后误加介词for: 他们决定在电视上为他们的新产品打广告。 误:They decided to advertise for their new product on TV. 正:They decided to advertise their new product on TV. 注:advertise 可用作及物或不及物动词,但含义不同:advertise sth=为卖出某物而打广告;advertise for sth=为寻找某物而打广告。如:advertise for a job=登广告求职。由于受汉语“为”的影响,而此处误加了介词for。类似地,汉语中的“为人民服务”,说成英语是serve the people,而不是serve for the people,“为某人的死报仇”,说成英语是avenge sb’s death,而不是avenge for sb’s death,等等。用法3:(表用途)用于,用来。如: Knives are used for cutting things. 小刀是用来切东西的。 This knife is for cutting bread. 这把小刀是用于切面包的。 It’s a machine for slicing bread. 这是切面包的机器。 The doctor gave her some medicine for her cold. 医生给了她一些感冒药。 用法4:为得到,为拿到,为取得。如: He went home for his book. 他回家拿书。 He went to his friend for advice. 他去向朋友请教。 She often asked her parents for money. 她经常向父母要钱。

of和for的用法

of 1....的,属于 One of the legs of the table is broken. 桌子的一条腿坏了。 Mr.Brown is a friend of mine. 布朗先生是我的朋友。 2.用...做成的;由...制成 The house is of stone. 这房子是石建的。 3.含有...的;装有...的 4....之中的;...的成员 Of all the students in this class,Tom is the best. 在这个班级中,汤姆是最优秀的。 5.(表示同位) He came to New York at the age of ten. 他在十岁时来到纽约。 6.(表示宾格关系) He gave a lecture on the use of solar energy. 他就太阳能的利用作了一场讲演。 7.(表示主格关系) We waited for the arrival of the next bus. 我们等待下一班汽车的到来。

I have the complete works of Shakespeare. 我有莎士比亚全集。 8.来自...的;出自 He was a graduate of the University of Hawaii. 他是夏威夷大学的毕业生。 9.因为 Her son died of hepatitis. 她儿子因患肝炎而死。 10.在...方面 My aunt is hard of hearing. 我姑妈耳朵有点聋。 11.【美】(时间)在...之前 12.(表示具有某种性质) It is a matter of importance. 这是一件重要的事。 For 1.为,为了 They fought for national independence. 他们为民族独立而战。 This letter is for you. 这是你的信。

介词for用法完全归纳

用法1:(表目的)为了。如: They went out for a walk. 他们出去散步了。 What did you do that for? 你干吗这样做? That’s what we’re here for. 这正是我们来的目的。 What’s she gone for this time? 她这次去干什么去了? He was waiting for the bus. 他在等公共汽车。 【用法说明】在通常情况下,英语不用for doing sth 来表示目的。如:他去那儿看他叔叔。 误:He went there for seeing his uncle. 正:He went there to see his uncle. 但是,若一个动名词已名词化,则可与for 连用表目的。如: He went there for swimming. 他去那儿游泳。(swimming 已名词化) 注意:若不是表目的,而是表原因、用途等,则其后可接动名词。(见下面的有关用法) 用法2:(表利益)为,为了。如: What can I do for you? 你想要我什么? We study hard for our motherland. 我们为祖国努力学习。 Would you please carry this for me? 请你替我提这个东西好吗? Do more exercise for the good of your health. 为了健康你要多运动。 【用法说明】(1) 有些后接双宾语的动词(如buy, choose, cook, fetch, find, get, order, prepare, sing, spare 等),当双宾语易位时,通常用for 来引出间接宾语,表示间接宾语为受益者。如:

介词for 的常见用法归纳

介词for 的常见用法归纳 贵州省黔东南州黎平县黎平一中英语组廖钟雁介词for 用法灵活并且搭配能力很强,是一个使用频率非常高的词,也是 高考必考的重要词汇,现将其常见用法归纳如下,供参考。 1.表时间、距离或数量等。 ①意为“在特定时间,定于,安排在约定时间”。如: The meeting is arranged for 9 o’clock. 会议安排在九点进行。 ②意为“持续达”,常于last、stay 、wait等持续性动词连用,表动作持续的时间,有时可以省略。如: He stayed for a long time. 他逗留了很久。 The meeting lasted (for)three hours. 会议持续了三小时。 ③意为“(距离或数量)计、达”。例如: He walked for two miles. 他走了两英里。 The shop sent me a bill for $100.商店给我送来了100美元的账单。 2. 表方向。意为“向、朝、开往、前往”。常与head、leave 、set off、start 等动词连用。如: Tomorrow Tom will leave for Beijing. 明天汤姆要去北京。 He put on his coat and headed for the door他穿上大衣向门口走去。 介词to也可表示方向,但往往与come、drive 、fly、get、go、lead、march、move、return、ride、travel、walk等动词连用。 3.表示理由或原因,意为“因为、由于”。常与thank、famous、reason 、sake 等词连用。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 For several reasons, I’d rather not meet him. 由于种种原因,我宁可不见他。 The West Lake is famous for its beautiful scenery.西湖因美景而闻名。 4.表示目的,意为“为了、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 He plays the piano for pleasure. 他弹钢琴是为了消遣。 There is no need for anyone to know. 没必要让任何人知道。 5.表示动作的对象或接受者,意为“给、为、对于”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 Here is a letter for you. 这儿有你的一封信。

for和to区别

1.表示各种“目的”,用for (1)What do you study English for 你为什么要学英语? (2)went to france for holiday. 她到法国度假去了。 (3)These books are written for pupils. 这些书是为学生些的。 (4)hope for the best, prepare for the worst. 作最好的打算,作最坏的准备。 2.“对于”用for (1)She has a liking for painting. 她爱好绘画。 (2)She had a natural gift for teaching. 她对教学有天赋/ 3.表示“赞成、同情”,用for (1)Are you for the idea or against it 你是支持还是反对这个想法? (2)He expresses sympathy for the common people.. 他表现了对普通老百姓的同情。 (3)I felt deeply sorry for my friend who was very ill. 4. 表示“因为,由于”(常有较活译法),用for (1)Thank you for coming. 谢谢你来。

(2)France is famous for its wines. 法国因酒而出名。 5.当事人对某事的主观看法,“对于(某人),对…来说”,(多和形容词连用),用介词to,不用for. (1)He said that money was not important to him. 他说钱对他并不重要。 (2)To her it was rather unusual. 对她来说这是相当不寻常的。 (3)They are cruel to animals. 他们对动物很残忍。 6.和fit, good, bad, useful, suitable 等形容词连用,表示“适宜,适合”,用for。(1)Some training will make them fit for the job. 经过一段训练,他们会胜任这项工作的。 (2)Exercises are good for health. 锻炼有益于健康。 (3)Smoking and drinking are bad for health. 抽烟喝酒对健康有害。 (4)You are not suited for the kind of work you are doing. 7. 表示不定式逻辑上的主语,可以用在主语、表语、状语、定语中。 (1)It would be best for you to write to him. (2) The simple thing is for him to resign at once.

双宾语 to for的用法

1.两者都可以引出间接宾语,但要根据不同的动词分别选用介词to 或for:(1) 在give, pass, hand, lend, send, tell, bring, show, pay, read, return, write, offer, teach, throw 等之后接介词to。 如: 请把那本字典递给我。 正:Please hand me that dictionary. 正:Please hand that dictionary to me. 她去年教我们的音乐。 正:She taught us music last year. 正:She taught music to us last year. (2) 在buy, make, get, order, cook, sing, fetch, play, find, paint, choose,prepare, spare 等之后用介词for 。如: 他为我们唱了首英语歌。 正:He sang us an English song. 正:He sang an English song for us. 请帮我把钥匙找到。 正:Please find me the keys. 正:Please find the keys for me. 能耽搁你几分钟吗(即你能为我抽出几分钟吗)? 正:Can you spare me a few minutes? 正:Can you spare a few minutes for me? 注:有的动词由于搭配和含义的不同,用介词to 或for 都是可能的。如:do sb a favour=do a favour for sb 帮某人的忙 do sb harm=do harm to sb 对某人有害

for和of的用法

for的用法: 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 Thank you for your last letter. 谢谢你上次的来信。 Thank you for teaching us so well. 感谢你如此尽心地教我们。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。 Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如:

I usually do the running for an hour in the morning. 我早晨通常跑步一小时。 We will stay there for two days. 我们将在那里逗留两天。 5. 表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如:

英语中for的用法讲解

英语中for的用法讲解 英语中for的用法讲解? for 1. prep. (1)因为,由于for this reason (2) 表示时间\距离长度;for three days;He ran for three miles. (3) 为了:What do you come here for? (4) 表示等价交换:He sold his house for 30,000 dollars. (5) 开往;前往We set off for London. (6) 代;替;代表Red is for danger. (7) 用于for + 名词或代词+ to + 不定式动词的名词短语中The bell rang for the lesson to begin. 2. conj 因为(表示推测或附加的原因,前后为并列句) It must have rained last night, for the ground is wet. Kuntta ( a prisoner ) knew day broke, for he heard the birds singing. 尽管for 的用法较多,但记住常用的几个就可以了。for的用法的确很多,可用作介词和连词,介词用法尤为丰富。以下详细列出了用法和句例,供你参考。for 1 preposition 1 used to say who is intended to get or use something, or where

something is intended to be used I've got a present for you. Someone left a message for Vicky. 2 in order to help someone or something I looked after the kids for them. Let me carry that bag for you. 3 used to say what the purpose of an object, action etc is for doing something a knife for cutting bread What did you do that for? 4 in order to have, do, get, or obtain something Are you waiting for the bus? the qualifications necessary for a career in broadcasting 5 used to say how long an action or situation continues for Bake the cake for 40 minutes. We had been talking for a good half hour. 6 used to talk about distance We walked for miles. Factories stretch for quite a way along the canal. 7 if something is arranged for a particular time, it is planned that it should happen then I've invited them for 9 o'clock.

双宾语tofor的用法

1. 两者都可以引出间接宾语,但要根据不同的动词分别选用介词to 或for: (1) 在give, pass, hand, lend, send, tell, bring, show, pay, read, return, write, offer, teach, throw 等之后接介词to。 如: 请把那本字典递给我。 正:Please hand me that dictionary. 正:Please hand that dictionary to me. 她去年教我们的音乐。 正:She taught us music last year. 正:She taught music to us last year. (2) 在buy, make, get, order, cook, sing, fetch, play, find, paint, choose,prepare, spare 等之后用介词for 。如: 他为我们唱了首英语歌。 正:He sang us an English song. 正:He sang an English song for us. 请帮我把钥匙找到。 正:Please find me the keys. 正:Please find the keys for me. 能耽搁你几分钟吗(即你能为我抽出几分钟吗)? 正:Can you spare me a few minutes? 正:Can you spare a few minutes for me? 注:有的动词由于搭配和含义的不同,用介词to 或for 都是可能的。如: do sb a favou r do a favour for sb 帮某人的忙 do sb harnn= do harm to sb 对某人有害

常用介词用法(for-to-with-of)

常用介词用法(for-to-with-of)

For的用法 1. 表示“当作、作为”。如: I like some bread and milk for breakfast. 我喜欢把面包和牛奶作为早餐。 What will we have for supper? 我们晚餐吃什么? 2. 表示理由或原因,意为“因为、由于”。如: Thank you for helping me with my English. 谢谢你帮我学习英语。 3. 表示动作的对象或接受者,意为“给……”、“对…… (而言)”。如: Let me pick it up for you. 让我为你捡起来。Watching TV too much is bad for your health. 看电视太多有害于你的健康。 4. 表示时间、距离,意为“计、达”。如: I usually do the running for an hour in the morning. 我早晨通常跑步一小时。 We will stay there for two days. 我们将在那里逗留两天。

5. 表示去向、目的,意为“向、往、取、买”等。如: Let’s go for a walk. 我们出去散步吧。 I came here for my schoolbag.我来这儿取书包。 I paid twenty yuan for the dictionary. 我花了20元买这本词典。 6. 表示所属关系或用途,意为“为、适于……的”。如: It’s time for school. 到上学的时间了。 Here is a letter for you. 这儿有你的一封信。 7. 表示“支持、赞成”。如: Are you for this plan or against it? 你是支持还是反对这个计划? 8. 用于一些固定搭配中。如: Who are you waiting for? 你在等谁? For example, Mr Green is a kind teacher. 比如,格林先生是一位心地善良的老师。

英语形容词和of for 的用法

加入收藏夹 主题: 介词试题It’s + 形容词 + of sb. to do sth.和It’s + 形容词 + for sb. to do sth.的用法区别。 内容: It's very nice___pictures for me. A.of you to draw B.for you to draw C.for you drawing C.of you drawing 提交人:杨天若时间:1/23/2008 20:5:54 主题:for 与of 的辨别 内容:It's very nice___pictures for me. A.of you to draw B.for you to draw C.for you drawing C.of you drawing 答:选A 解析:该题考查的句型It’s + 形容词+ of sb. to do sth.和It’s +形容词+ for sb. to do sth.的用法区别。 “It’s + 形容词+ to do sth.”中常用of或for引出不定式的行为者,究竟用of sb.还是用for sb.,取决于前面的形容词。 1) 若形容词是描述不定式行为者的性格、品质的,如kind,good,nice,right,wrong,clever,careless,polite,foolish等,用of sb. 例: It’s very kind of you to help me. 你能帮我,真好。 It’s clever of you to work out the maths problem. 你真聪明,解出了这道数学题。 2) 若形容词仅仅是描述事物,不是对不定式行为者的品格进行评价,用for sb.,这类形容词有difficult,easy,hard,important,dangerous,(im)possible等。例: It’s very dangerous for children to cross the busy street. 对孩子们来说,穿过繁忙的街道很危险。 It’s difficult for u s to finish the work. 对我们来说,完成这项工作很困难。 for 与of 的辨别方法: 用介词后面的代词作主语,用介词前边的形容词作表语,造个句子。如果道理上通顺用of,不通则用for. 如: You are nice.(通顺,所以应用of)。 He is hard.(人是困难的,不通,因此应用for.) 由此可知,该题的正确答案应该为A项。 提交人:f7_liyf 时间:1/24/2008 11:18:42

for循环的使用和用法

简单的来说,++i 和i++,在单独使用时,就是i=i+1。 而a = ++i,相当于i=i+1; a = i; 而a = i++,相当于 a = i; i=i+1; 如果实在搞不明白++ --怎么回事,那也不是什么天塌下来的事。 因为a=++i完全可以写成i++; a=i。 a=i++完全可以写成a=i; i++。 而且,这也是一种好的程序风格:++ -- 语句如非特殊需要,请单独一行使用。假设i=1 如果执行a=i++ 完之后, a=1, i=2 如果执行a=++i 结果是, a=2, i=2 要分清楚++i,和i++的区别. i++是先执行当前命令,再执行递增. ++i是先递增,再执行命令 缺点: 对于数组,不能方便的访问下标值; 对于集合,与使用Interator相比,不能方便的删除集合中的内容(在内部也是调用Interator). 除了简单遍历并读取其中的内容外,不建议使用增强的for循环。 一、遍历数组 语法为: for (Type value : array) { expression value; } //以前我们这样写: void someFunction () {

int[] array = {1,2,5,8,9}; int total = 0; for (int i = 0; i < array.length; i++) { total += array[i]; } System.out.println(total); } //现在我们只需这样写(和以上写法是等价的): void someFunction () { int[] array = {1,2,5,8,9}; int total = 0; for (int n : array) { total += n; } System.out.println(total); } 这种写法的缺点: 显而易见,for/in(for each)循环自动控制一次遍历数组中的每一个元素,然后将它赋值给一个临时变量(如上述代码中的int n),然后在循环体中可直接对此临时变量进行操作。这种循环的缺点是: 1. 只能顺次遍历所有元素,无法实现较为复杂的循环,如在某些条件下需要后退到之前遍历过的某个元素;

to和for的用法有什么不同(一)

to和for的用法有什么不同(一) 一、引出间接宾语时的区别 两者都可以引出间接宾语,但要根据不同的动词分别选用介词to 或for,具体应注意以下三种情况: 1. 在give, pass, hand, lend, send, tell, bring, show, pay, read, return, write, offer, teach, throw 等之后接介词to。如: 请把那本字典递给我。 正:Please hand me that dictionary. 正:Please hand that dictionary to me. 她去年教我们的音乐。 正:She taught us music last year. 正:She taught music to us last year. 2. 在buy, make, get, order, cook, sing, fetch, play, find, paint, choose, prepare, spare 等之后用介词for 。如: 他为我们唱了首英语歌。 正:He sang us an English song. 正:He sang an English song for us. 请帮我把钥匙找到。 正:Please find me the keys. 正:Please find the keys for me. 能耽搁你几分钟吗(即你能为我抽出几分钟吗)? 正:Can you spare me a few minutes?

正:Can you spare a few minutes for me? 3. 有的动词由于用法和含义不同,用介词to 或for 都是可能的。如: do sb a favor=do a favor for sb 帮某人的忙 do sb harm=do harm to sb 对某人有害 在有的情况下,可能既不用for 也不用to,而用其他的介词。如: play sb a trick=play a trick on sb 作弄某人 请比较: play sb some folk songs=play some folk songs for sb 给某人演奏民歌 有时同一个动词,由于用法不同,所搭配的介词也可能不同,如leave sbsth 这一结构,若表示一般意义的为某人留下某物,则用介词for 引出间接宾语,即说leave sth for sb;若表示某人死后遗留下某物,则用介词to 引出间接宾语,即说leave sth to sb。如: Would you like to leave him a message? / Would you like to leave a message for him? 你要不要给他留个话? Her father left her a large fortune. / Her father left a large fortune to her. 她父亲死后给她留下了一大笔财产。 二、表示目标或方向的区别 两者均可表示目标、目的地、方向等,此时也要根据不同动词分别对待。如: 1. 在come, go, walk, move, fly, ride, drive, march, return 等动词之后通常用介词to 表示目标或目的地。如: He has gone to Shanghai. 他到上海去了。 They walked to a river. 他们走到一条河边。

相关文档
最新文档