第二章 visual foxpro数据运算(The second chapter is Visual FoxPro data operation)_第1页
第二章 visual foxpro数据运算(The second chapter is Visual FoxPro data operation)_第2页
第二章 visual foxpro数据运算(The second chapter is Visual FoxPro data operation)_第3页
第二章 visual foxpro数据运算(The second chapter is Visual FoxPro data operation)_第4页
第二章 visual foxpro数据运算(The second chapter is Visual FoxPro data operation)_第5页
已阅读5页,还剩20页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、第二章 visual foxpro数据运算(The second chapter is Visual FoxPro data operation)The second chapter is Visual FoxPro data operation1, followed by Visual FoxPro=, ABC and ABC= Visual FoxPro command, and then perform? The result of the Visual FoxPro+ABC command is ABCABC.2, (2001-9-20) - (2001-9-10) +42, the

2、result is 6.3, the following 89TWDDFF cannot be used as the variable name in VFP.4, the following assignment expressions cannot be used as expressions for VFP.5. The value of the expression 2*32+2*8/4+32 is 31.6, the function INT (-3.415) value is -3.7, the value of function VAL (16Year) is 16.8, th

3、e function INT (RAND () *10) is an integer in the range of (0, 10).9, if x is a positive real number, the expression for X third decimal places four to five is 0.01*INT (100* (x+0.005).10, digital formula sin250 written VFP expression is SIN (25*PI) (/180).11, x is less than 100 non negative numbers

4、, using the VFP expression to represent 0=X and x100.12 in the following notation, AB7 is the legal variable name in VFP.13, the value of function STR (-304.75) is 305.14. After continuing the following command, the output of the last command is A BCD.SET EXACT OFFX= A? IIF (A, =X, X-, BCD, X+, BCD)

5、15, in the following four sets of function operations, the result is the same.A) LEET (Visual FoxPro, 6) and SUBSTR (Visual FoxPro, 1,6)B) YEAR (DATE () and SUBSTR (DTOC (DATE), 7,2)C) VARTYPE ( 36-5*4 ) and VARTYPE (36-5*4)D) assume A=, this, B=, is, a, string, A-B, and A+B16. In the following stat

6、ement about the Visual FoxPro array, the error is that each array element in an array must be of the same data type.17. In the following functions, the function value is AT (people, Peoples Republic of China ).18, character type (Character) is used to store the data with the character representation

7、 of the data, including Chinese characters, letters, numbers, special symbols and space, the maximum length of up to 256 words, 6 function INT (-3.415) -3 is the value of.7, the value of function VAL (16Year) is 16.8, the function INT (RAND () *10) is an integer in the range of (0, 10).9, if x is a

8、positive real number, the expression for X third decimal places four to five is 0.01*INT (100* (x+0.005).10, digital formula sin250 written VFP expression is SIN (25*PI) (/180).11, x is less than 100 non negative numbers, using the VFP expression to represent 0=X and x100.12 in the following notatio

9、n, AB7 is the legal variable name in VFP.13, the value of function STR (-304.75) is 305.14. After continuing the following command, the output of the last command is A BCD.SET EXACT OFFX= A? IIF (A, =X, X-, BCD, X+, BCD)15, in the following four sets of function operations, the result is the same.A)

10、 LEET (Visual FoxPro, 6) and SUBSTR (Visual FoxPro, 1,6)B) YEAR (DATE () and SUBSTR (DTOC (DATE), 7,2)C) VARTYPE ( 36-5*4 ) and VARTYPE (36-5*4)D) assume A=, this, B=, is, a, string, A-B, and A+B16. In the following statement about the Visual FoxPro array, the error is that each array element in an

11、array must be of the same data type.17. In the following functions, the function value is AT (people, Peoples Republic of China ).18, character (Character) data is used to store data represented by characters, including Chinese characters, letters, numbers, special symbols and spaces, with a maximum

12、 length of 256 bytes.19. Date data is used to store data representing dates, and the data length is fixed to 8 bytes. A strict format for date dataFor dd-mm-yy.20, EOF () is the test function, when the data table file is in use, the record pointer has reached the tail, and its function value is 0.21

13、. The answer for AT (the University of Beijing language and Culture Institute) is 13.The value of 22 and STR (109.87,7, 3) is 109.870.23, constant refers to the process of its fixed amount of _D_ fixed.24, numerical constants can be expressed in decimal _ _.25. The maximum length of character data i

14、s 20.26, the following constant _123_ is a valid numeric constant.27, the variable refers to the amount of the _ storage area _ allows changes in the operation process.28, for the definition of array, the following statement is correct DIMENSION A (2,4,3).29, in the logic operation, in accordance wi

15、th the operation principle of _ ANDORNOT _.30, known as D1 and D2 as date variables, the following 4 expressions illegal is D1+D2.31 、 in the following 4 expressions, the error is name = = Engineer.In 32, Visual, FoxPro, the length of a variable name should not exceed _20_ characters.33, the functio

16、n INT (numeric expression) function is to return the integer part of the value of the numeric expression.34. In the following 4 expressions, the result of the operation is COTD (11/22/01) -20.35, if a value field width of 8, decimal 2, then the integer part of the maximum value of 999.36, with varia

17、ble pi=3.1415926, command execution, ROUND (PI, 3) display results of 3.142.37, Visual FoxPro data types do not include character type.38, the following four statements, the correct store, 1, to, a, B.39, the following option cannot return the logical value of BOF ().40, with a field variable name,

18、the current value of Zhao Lei, and there is a memory variable name, and its value is He Fei, then the order:? The name should be the value of Zhao Lei.41, set X= ABC, Y= ABCD, then the following expression, X in.T., is $Y.42, logical data values can not be.T. or.F.,.Y. or.N.43? The output of the ROU

19、ND (4.758,2) command is 4.750.44, known string M= 1234, N= 5678. Then the operation result of connection operation M-N is.45, set the field variable job is character type, pay is numerical, can express job is the director and pay is no more than 1000 yuan expression is job= director .AND.pay7.OR. a

20、+ B $123abc123 is calculated, the order of operations is.A) - .OR.+ $B) OR + $ C) -.OR.$+ D) + $- .OR.The value of 58, CTOD (98/09/28) should be September 28, 1998.59, the following options do not get character data is DTOC (DATE ().60 after executing the following command, the output is 666.STORE 6

21、66.49 TO XINT (&X+4)61, there are the following commands: TYPE (A).STORE 2, TO, ASTORE A+2 TO ASTORE A=A+2 TO AAfter the sequential execution, the last command is displayed as U.62. Execute the following command sequence:YA=100, YA=200, YAB=300, N=, A, M=, Y&N, &M, and the last command should be dis

22、played at 300.63, with the DIMENSION Q (2,3) command defined array Q, and then to each array element assignment: Q (1,1) =1, Q (1,2) =2, Q (1,3) =3, Q (2,1) =4, Q (2,2) =5, Q (2,3) =6. Then execute the command? Q (2) shows that the result is an undefined hint of the variable.64, regarding the operat

23、or precedence in FoxPro, the following is incorrect in that the logical operator has precedence over the relational operator.65. A numeric field has a width of 6 and a decimal number of 2. The minimum value that the field can hold is -99.9.66, set the current database file contains the field NAME, t

24、he system has a memory variable name is also NAME, the following command? The display of NAME is the value of the field variable NAME.67, employee database has D field date of birth, integer to calculate the chronological age of the workers, should use the command? (DATE) - /365 (date of birth).68,

25、after the following command sequence is executed, the display value of the variable NDATE is 99-08-06.STORE 1999-08-06 to MDATENDATE=MDATE+2NDATE?STORE TO MDATE 99/08/06NDATE=MDATE+2? NDATE69, after the command DIME array (5,5) is executed, the value of array (3,3) is.T.70. Define an array with DIME

26、NSION P (2), and then execute the command TYPE (P (1), and the result is N.71, execute the following command in sequence:X=100Y=8X=x+yX, x=x+yThe last commands display is 100.E.72, assume that X is a N variable and Y is a C type variable, and the expression in the following options that conforms to

27、the FoxPro syntax requirement is X-001.73, the variable F is not defined. After the following command is executed, the U command is displayed.A) TYPE (F) B) TYPE (.F.) C) TYPE ( F ) D) TYPE (.F.)74, you can compare the size of data types, including numerical, character type, date type, logical type.

28、75, employee database D type field, date of birth, to show the employees birthday months and dates, you can use the command? Name +SUBSTR (date of birth, 4, 2), +SUBSTR (date of birth, 7, 2).76, set the X=123, Y=456, Z=, X+Y, and the value 6+&Z of the expression 6+&Z.77, after using the DECLARE comm

29、and to define the array, the array element is logical before the data type is assigned.78, execute the following command sequence (set today is August 6, 2000)STORE DATE () TO MDATEMDATE = MDATE-365? YEAR (MDATE)The result of the display is an error in the sequence of statements.79, set the variable

30、 A= 99/10/01, then the expressions MONTH (CTOD (A) and DAY (CTOD (A) are 10 and 1, respectively).80, set a database with 18 records, when EOF () returns the true value, then the current record number should be 0.81, have the following command sequenceSTORE 456 TO XSTORE 123, +X, TO, YSTORE TRIM (Y-

31、789 ) TO ZAfter executing the above command, the value of Z is 123456789.82. The following character type constants Hello, world, which means that the error in the method is Hello, world!.83, in the following four sets of commands, each group has two functions that are computed separately, and the r

32、esults are the same as TYPE (36-5*4) and TYPE (36-5*4).84, set A= ABCD + space (5), B= efgh, then the result of A-B is the same as the following ABCD + efgh +space (1) option.85, assuming the string variable A= 123, B= 234, the following expression is correct.NOT. (A=B).OR.B$(13579 ).86, close the m

33、ulti table file, and release all memory variables, the command for.A) CLEAR ALL or CLOSE B) CLEAR ALL or CLOSE ALLC) CLEAR or CLOSE ALL D) CLEAR or CLOSE87, the value of the memory variable Y is 2099 after the command Y=YEAR (12/15/99) is executed.88. In the following expressions, the result is alwa

34、ys logical and is a date operation expression.89, when dealing with data with a database management system, it is incorrect to say that some of the intermediate variables used for the time being are called memory variables.90, memory once defined, it can change the width of _ _.91, the following fou

35、r groups of expressions, the result is the logical value of.T. is.A) this, $ this, is, a, string, B , this, $, THIS, IS, A, STRINGc)这是一个字符串“$”,这个“”这是一个字符串92、下列逻辑运算,结果是假的是?ABCDE= =ABCDE。93、下列中,测试库文件记录数的函数是。一)recno() B)reccount() C)found() D)eof()94、对内存变量中的叙述,不正确的是内存变量用赋值语句定义。95、逻辑判断式圆(123.456,0)85。99

36、、假定x = 3,执行命令?x = x + 1后,其结果是。a)4 B(3 C);T. D)F。100、假定x = 2,y = 5,执行下列运算后,能够得到数值型结果的是x + 3 = Y。101、设当前数据库有10条记录(记录未进行任何索引),在下列三种情况下,当前记录号为1时;eof()为真时;bof()为真时,命令?recn()的结果分别是_1,10,0_。102、设x = y =“ABC”、“ABCD”,则下列表达式中值为。T.的是_ x = y _。103、在下面的Visual FoxPro表达式中,运算结果是逻辑真的是_空(null _。)。104、设D = 5 6,命令?VART

37、YPE(D)的输出值是_ N _。105、设有变量SR =“2004年上半年全国计算机等级考试”,能够显示”2004年上半年计算机等级考试”的命令是_?substr(Sr,1,8)+ substr(Sr,11.17)_。106、在下列函数中,函数返回值为数值的是_ substr(DTOC(),7)_。107、设x = y =“ABC”、“ABCD”,则下列表达式中值为的是_ T。一)X = Y B)X = = Y C)X Y元D)在(x,y)= 0108、设N = 886,M = 345,K =我+ N,表达式1 + K的值是_346_。109、函数空(O)和isnull(O)的返回值分别是和

38、。T T。二、填空题1、数组是按一定顺序排列的_。内存变量2、货币型数据是用来存储货币类型的数据,数据长度固定为8个字节,它的小数位数固定为_位,超过则四舍五入,整数位最大可达_位。43、浮点型数据在功能上等价于数值型数据,在存储时采用浮点格式。它由_、_及字母E组成尾数,阶数。4 2001 12 31、系统日期为年月日,下列表达式的值是_。9918瓦尔(substr(1999,3)+右(STR(年(Date(),2)+ 175、?式(10 / 25 / 01)的输出值是_。n6、如果一个表达式中包含算术运算、关系运算、逻辑运算和函数时,则运算的优先次序是_、_、_、_。函数、算术运算、关系运

39、算、逻辑运算7、字符型常量是用定界符括起来的字符串。字符型常量的定界符有半角_、_或_等三种。Single quotation marks, double quotes, square bracketsType 8, memory is not fixed, memory depends on the type of _ type, which can put different types of variable values assigned to the same memory. Variable value9, the numerical data for _ maximum widt

40、h, maximum width of _ floating-point data, logical data for _ fixed width, fixed length data of date type for _, memo data for fixed width _. 20,20,1,8,1010, delete the current memory in memory, should use the command _, remove all memory, and close all files, No. 1 work area is set to the current w

41、orkspace, should use the command _. .clear, memory, clear, all11, the Visual variable names in FoxPro by Chinese characters or letter, composed of letters, numbers and Chinese characters, underline, length variable name is generally not more than _ characters (database field variables in the table u

42、p to 128 characters). Ten12, the date data type is a kind of special value, Visual FoxPro system, date and time of the operator only two _ and _. Addition, subtraction13 types of data, TYPE test function return value has six kinds, respectively is _, said _; _, said _; _, said _; _, said _; _, said

43、_; _, said _. 1) C, character type (2) N, numerical type; 3) D, date type; 4) L, logical type; 5) M, note type; 6) U, undefined14, AT? (+, a+b=c), the results showed _. Two15,? LEN (TRIM (National Day holiday + -), the results showed _. Eight16,? CTOD (99-01-01) -365, the results showed _. .98-01-01

44、17, note the data length is fixed to _ bytes, memo file extension to _. 4, FPTIn July 1997 18, 1 daily date constant is expressed as _. .07/01/9719,? YEAR (99-12-30), the results showed _. One thousand nine hundred and ninety-nine20, MDY (99-12-30), the results showed _. December 30,9921,? MAX (10,2

45、0,30), the results showed _. ThirtyArray element subscript 22, FoxPro from the beginning _. One23, set the variable a=1, c1= shibuguosan c2=, three, 1).F.,.2).T.,.T., 3), 4).T.1) the expression of a3.AND.c1 C2 was $_. 2) the expression of a3.AND.c2 C1 was $_.3) expression of a3.OR.c1 $C2 for _. 4) expression of a1 or x1.OR.x0.OR.Y= ABC value is _;(5) the expression of INT (X/100) value is _;(6) the expression $Y development value is _;(7) the expression value of X100.OR.NOT.Z is _;(8) the expression Chinese is the value of +Y _;(9)

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论