WB QUIZ As Of 1/95 Write your answers on a separate page. 1) What are internal, external and display files? How do they differ? 2) Does WB support dynamic memory allocation? 3) Which single WB statement allows full screen processing (i.e. output and input to and from) of multiple fields at the same time? 4) How is a user defined function declared? Describe both single and multi-line formats. 5) Name three looping constructs used in WB. 6) Is WB more properly classified as a 3GL or 4GL, and why? 7) What subscript number references the first element of an array? 8) Can you set an error trap in a way that affects more than one source statement? If so, provide an example. 9) Name three statements that may be used to exit an error trap. 10) How many variables are permitted in a LINPUT statement? 11) In a FORM statement, what is the difference between a C and a V field specification? 12) FORM statements are used for (list all that apply): a) Printing b) Screen input c) Reading files d) Redimensioning e) Writing files f) Screen output Answers: 1) Internal files are specific to WB, contain a built-in header that tells WB record length, etc., and employ fixed length records. Records marked "deleted" are automatically skipped by WB. External files may contain varying lengths of records, may be positioned by record number or byte number, and contain no internal delete code. Display files are commonly referred to as ascii print files. The are data files that may be sent to a printer and contain variable length records that are terminated by a carriage return and line feed. 2) Yes. The MAT statement permits the resizing of arrays, a process that obtains or frees memory. 3) RINPUT FIELDS. 4) Single line- DEF FNX(A,B$) = A + LEN(B$) Multi-line- DEF FNX(A,B$) FNA = A + LEN(B$) END FN 5) FOR NEXT DO WHILE IF GOTO 6) 3GL because it is procedurally oriented. It has GOSUB, GOTO, and many sequentially processed verbs. 7) The default is 1. However, the program may specify OPTION BASE ZERO to override the default. 8) Yes. ON IOERR GOTO FILE_ERROR. 9) RETRY, CONTINUE and GOTO. 10) One. 11) The C field type always processes the full length of the field, whereas the V field type automatically trims trailing spaces during input and read operations. 12) A, B, C, E, and F. The above quiz can be used to evaluate a programmer's reading comprehension as follows: Provide the subject with a WB manual to study on his or her own for a week. Indicate that the test will be primarily on the Statements section. After one week administer the test. It should take no more than a half hour. And it should be done without the manual. Best results can be obtained by giving the test to two or three job candidates and comparing the results.