问题 单项选择题

设MY.DBF数据库中共有10条记录,执行如下命令序列: USE MYGOTO 2DISPLAY ALLRECNO()执行最后一条命令后,屏幕显示的值是( )。

A.2

B.3

C.10

D.11

答案

参考答案:D

解析: GOTO 和GO 命令是等价的,命令格式如下:GO nRecordNumber|TOP|BOTTOM 其中nRecordNumber是记录号,即直接按记录号定位;TOP是表头,当不使用索引时是记录号为1的记录,使用索引时是索引项排在最前面的索引对应的记录;BOTTOM是表尾,当不使用索引时是记录号最大的那条记录,使用索引时是索引项排在最后面的索引对应的记录。题意中的GOTO 2表示指针指向第2条记录。 DISPLAY ALL 是显示全部记录,此时指针指向了最后一条记录。 RECNO()函数的功能是返回当前表文件或指定表文件中当前记录的记录号。如果指定工作区上没有打开表文件,函数值为0。如果记录指针指向文件尾,函数值为表文件中的记录数加1。如果记录指针指向文件首,函数值为表文件中第一条记录的记录号。由于DISPLAY ALL命令时,指针指向了文件尾,所以RECNO()的函数值为表文件中的记录数加1,即11。

阅读理解

Before you go to another country it is a great help if you know the language and some of the customs of the country.

When people meet each other for the first time in Britain, they say “How do you do?” and shake hands. Usually they do not shake hands when they just meet or say goodbye. But they shake hands after they haven’t met for a long time or when they will be away from each other for a long time.

Last year a group of German students went to England for a holiday. Their teacher told them that the English people hardly shake hands. So when they met their English friends at the station,

they kept their hands behind their backs. The English students had learned that the Germans shake hands as often as possible, so they put their hands in front and got ready to shake hands with them. It made both of them laugh.

小题1:It is ______ if you know the language and some of the customs of the country.

A.not useful

B.not helpful

C.very helpful

D.very bad小题2:English people usually shake hands when they ______.

A.meet every time

B.meet for the first time

C.say goodbye to each other

D.say hello to each other小题3:Usually English people don’t shake hands ______.

A.when they will be away for a long time

B.when they say “How do you do?”

C.when they just meet or say goodbye

D.after they haven’t met for a long time小题4:Which of the statements is RIGHT?

A.German people shake hands as often as possible.

B.English people shake hands as often as possible

C.German people hardly shake hands

D.Neither English people nor Germans shaking hands.小题5:The story is about ______.

A.shaking hands

B.languages

C.customs

D.languages and customs

单项选择题