June 24 2002 11:19:55.384 AM FILUM_PRB A set of test programs for FILUM. TEST001 FILE_APPEND makes a new version of a file which is "appendable". Current contents of filprb_append.txt This is the file: filprb_append.txt After the first pass, it has a total of 4 lines of text. FILE_APPEND - Note: The number of records in the file is 4 Contents of file after reopening in APPEND mode: This is the file: filprb_append.txt After the first pass, it has a total of 4 lines of text. This is new information that has been written to the file during a separate pass. The file should now contain a total of 11 lines of text. TEST002 FILE_CHAR_COUNT counts the characters in a file. FILE_LINE_COUNT counts the lines in a file. FILE_PARA_COUNT counts the paragraphs in a file. FILE_WORD_COUNT counts the words in a file. Examining file: filprb_test.txt Number of characters: 215 Number of lines: 16 Number of paragraphs: 1 Number of words: 45 TEST003 FILE_COPY makes a copy of a file. TEST004 FILE_GET_NEXT_WORD gets the next word from a file. Line Word ---WORD--- ---TEXT-------------- 1 1 [ 1] filprb_test.txt 1 2 1] filprb_test.txt 1 3 filprb_tes 2 1 [ 2] 2 2 2] 3 1 [ 3] ANNA 3 2 3] ANNA 3 3 ANNA 4 1 [ 4] Anna 4 2 4] Anna 4 3 Anna 5 1 [ 5] Anna 5 2 5] Anna 5 3 Anna 6 1 [ 6] Belle 6 2 6] Belle 6 3 Belle 7 1 [ 7] Bell 7 2 7] Bell 7 3 Bell 8 1 [ 8] Belle 8 2 8] Belle 8 3 Belle 9 1 [ 9] BELL 9 2 9] BELL 9 3 BELL 10 1 [10] Charley Horse 10 2 Charley Horse 10 3 Horse 11 1 [11] Charley Horse 11 2 Charley Horse 11 3 Horse 12 1 [12] Charley Horse 12 2 Charley Horse 12 3 Horse 13 1 [13] Charley Horse 13 2 Charley Horse 13 3 Horse 14 1 [14] Charley Horse 14 2 Charley Horse 14 3 Horse 15 1 [15] CharleyHorse 15 2 CharleyHor 16 1 [16] charleyhorse 16 2 charleyhor End of file! TEST005 FILE_NAME_EXT_GET finds a file extension. FILE_NAME Begin End bob.for 4 7 N.B.C.D 6 7 Naomi. 6 6 Arthur 0 0 .amos 1 5 TEST006 FILE_NAME_EXT_SWAP changes a file extension. Input Output FILE_NAME EXT FILE_NAME bob.for obj bob.obj bob.bob.bob txt bob.bob.txt bob. yak bob.yak bob ps bob.ps .oops eek .eek TEST007 FILE_NAME_INC increments a string Input Output file???.dat file???.dat file072.dat file073.dat 2cat9.dat 3cat0.dat fred99.txt fred00.txt TEST008 FILE_PAREN_CHECK checks a file for parenthesis errors. FILE_PAREN_CHECK - Warning! Parenthesis error in the file: filprb_parens1.txt Number of missing right parentheses: 2 FILE_PAREN_CHECK - Warning! Parenthesis error in the file: filprb_parens2.txt An illegal right parenthesis occurs on line 5 premature one, which should show up now!), FILE_PAREN_CHECK - Note: Parenthesis checks passed for file: filprb_parens3.txt TEST009 FILE_REVERSE_COLUMNS makes a copy of a file with each line reversed. TEST010 FILE_REVERSE_ROWS makes a copy of a file with the lines in reverse order. TEST011 FILE_TAG_CHECK checks a file for tag errors. FILE_TAG_CHECK - Warning! Tag error in the file: filprb_parens1.txt Number of missing right tags: 2 FILE_TAG_CHECK - Fatal error! Could not open the input file: filprb_parens2.txt FILE_TAG_CHECK - Note: Tag checks passed for file: filprb_parens3.txt FILE_TAG_CHECK - Note: Tag checks passed for file: filprb_braces.txt TEST012 FILE_COLUMN_COUNT counts the columns in a file. It is assumed that the file contains a number of lines, with each line containing the same number of words. The task is to determine the number of words in a line, that is, the number of "columns" of text. Examining file: filprb_4by5.txt Number of columns: 5 TEST013 FILE_COLUMN_COUNT counts the columns in a file. FILE_COLUMN_RANGE finds the range of the columns. Examining file: columns.txt Contents of file: 0.0 0.0 2.0 2.0 -1.0 3.0 -2.0 2.0 0.0 0.0 8.0 2.0 9.0 5.0 7.0 4.0 8.0 2.0 5.0 6.0 6.0 7.0 8.0 8.0 11.0 7.0 10.0 4.0 8.0 2.0 6.0 4.0 5.0 6.0 Number of columns in file: 2 Col Minimum Maximum 1 -2.0000 11.0000 2 0.0000 8.0000 FILUM_PRB Normal end of execution.