问题 填空题

把一个磁盘文件的内容读到内存并在文本框中显示出来,然后把该文本框中的内容存入另一个磁盘文件,请填空完成程序。
在窗体上建立一个文本框,在属性窗口中把该文本框的MultiLine属性设置为 True,然后编写如下的事件过程:
Prlvate Sub Form_Click()
Open"D:\test1.txt"For Input As # 1
Text1.FontSize=14
Text1.FontName=“幼圆”
Do While Not EOF(1)
【13】
whole$=whole$+aspect$+Chr$(13)+Chr$(10)
Loop
Text1.Text= 【14】
Close
Open"D:\test2.txt"For Output As # 1
Print # 1, 【15】
Close
End Sub

答案

参考答案:[AC] Line Input #A,aspect$
[AD] Whole $
[AE] TextA. Text

解析: 文件的读操作使用Input#语句,其格式为:Input #文件号,题中根据EOF(1)可以推断文件号为1,由语句whole $=whole $+aspect $+Chr $(13)+Chr$(10)可知变量为aspect$,并且是以行读入内存的,故 [13]处的文件读操作语句应为Line Input # 1,aspect$。读入内容在文本框中显示出来,就给文本框的Text属性赋读入内容Whole $即可。
Print #1, Text1. Text表示把整个文本框Text1的内容一次性的写入文件。

填空题
单项选择题


With 2005 fast becoming "the year of the natural disaster", it is time to reflect on how engineering, science and technology can play their fullest part in protecting the planet.
Long before the Asian tsunami struck, the science community predicted the particular region of Indonesia to be hit by the next big earthquake; and the engineering and technology community had developed early warning systems costing only $ 30 million. But no government in the region heeded the warnings and no early warning systems were in place. We ignored technology of the advance warnings at our peril of 100,000 victims of the tsunami.
Governments are not alone in ignoring the views of their scientific community; the public too has its doubts. Part of the reason for this lack of confidence must be down to the failure to engage them in a meaningful way about their concerns. Trust is a two-way street. Instead of claiming that everything would be rosy in the scientific garden "if only the public understood", we must work hard to explore concerns, discover fears and delve deep into the depths of public perceptions. We are getting there. There is a growing realization that effective public engagement is of far greater value than banging the "public understanding" drum.
There are still doubters, of course, and sadly their cause is helped whenever they come across opinions presented as fact. All of us must guard against this debilitating practice. In time, effective public engagement should help deliver improved trust as well as better policy, which -- in turn -- might make it more difficult for scientists’ warnings to be ignored.
Today’s technology community is a triumph of international collaboration where engineers and scientists combine to develop solutions to our biggest problems. Of course, technology cannot stop natural disasters but it can mitigate their impact. We are able to identify the birds affected by avian flu. We can chart their migration patterns around the world. We have the means to pursue vaccines. And we have the communication channels to keep people informed.
Extolling the virtues of technology is not to pretend technology is perfect in every regard. Far from it. The profligate and unsustainable use of technology in energy and transport has contributed to climate change. But that doesn’t mean technology has failed us. We must never lose sight of the fact that technology itself will deliver the solutions to the very problems it can create. If we do, technology will remain sidelined and undervalued, and this major social failure will progressively disadvantage us all.
Our vision is of a society embracing technology as a weapon of both progress and defense. Since the beginning of civilization, we have relied on it and enjoyed its benefits -- and most new technologies have had hugely beneficial effects for most people. But now, in an age when the death toll from natural disasters is increasing year on year, with more people living in danger zones, it is ever more urgent that we rely on science and technology to warn us of the dangers to come and provide the solutions we need.

The author emphasizes all the following importance of public engagement in Paragraph 4 EXCEPT that it can help ______.

A.doubters trust scientific views

B.governments make better policies

C.prevent early warnings from being ignored

D.politicians guard against the debilitation of science