问题 单项选择题

条件函数IIF(LEN(SPACE(3))>3,1,-1)的值为______。

A..

B..

C.1

D.-1

答案

参考答案:D

解析:[知识点] Visual Foxpro的基本数据元素[评析] SPACE(数值表达式) 返回一定数量的空格,返回值是字符型。SPACE(3)的值是3个空格。 LEN(字符表达式) 返回一个字符串的长度,返回值是数值型。LEN(SPACE(3))的值是数值3。 IIF(条件,表达式1,表达式2) 如果条件成立则返回第1个表达式的值,否则返回第2个表达式的值,返回值可以是字符型、数值型、日期型、日期时间型、货币型。IIF(LEN(SPACE(3))>3,1,-1),即IIF(3>3,1,-1),所以最后的结果是-01。

单项选择题
单项选择题

Shopping for clothes is not the same experience for a man as it is for a woman. A man goes shopping because he needs something. He knows what he wants, and his purpose is to find it and buy it, the price is a less important consideration. All men simply walk into a shop and ask the assistant for what they want. If the shop has it, the salesman immediately produces it, and the business of trying it on is done at once. All being well, the bargain (交易) can be and often is completed in less than five minutes, with hardly any chat and to everyone’s satisfaction.

For a man, slight problems may begin when the shop does not have what he wants. Then the salesman tries to sell the customer (顾客) something else he offers the nearest he can to the thing required. He usually says, "I know this jacket is not the style (式样) you want, sir, but would you like to try it on for size It happens to be the color you wanted." Few men have patience with this treatment, and the usual reply is: "This is the right colour and may be the right size, but I should be wasting my time and yours by trying it on."

Now how does a woman go about buying clothes She does so in the opposite way. She has never fully made up her mind what she wants, and she is only "having a look round". She is always open to persuasion, indeed she considers of great importance what the saleswoman tells her, even what her friends tell her. She will try on any number of things. Highest in her mind is the thought of finding something that everyone thinks suits her. Most women have an excellent sense (判断力) of value when they buy clothes. They are always trying to find an unexpected bargain. Faced with a roomful of dresses, a woman may easily spend an hour going from one counter (柜台) to another before selecting the dresses she wants to try on. It takes a great deal of time but gives great joy. Most dress shops supply chairs for the waiting husbands.

When a man is buying clothes, he ().

A. puts price before quality

B. chooses things that others think suitable for him

C. does not mind much the price he has to pay for the fight things

D. buys good quality things, so long as they do not cost too much