Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199204.adf » April92 » !AWApr92/Goodies/All_At_C/TextFile
!AWApr92/Goodies/All_At_C/TextFile
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199204.adf » April92 |
Filename: | !AWApr92/Goodies/All_At_C/TextFile |
Read OK: | ✔ |
File size: | 01C7 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Last time we looked at how to pass command line arguments to our program, and made it accept input and output file names. We are now in a position to greatly extent this feature, and implement some more options, such as controlling the recognition of upper and lower case letters, the minimum word length, and the format of the output file, etc. To do this we need a method of handling a variable number of command line arguments, supplied in any order.
00000000 4c 61 73 74 20 74 69 6d 65 20 77 65 20 6c 6f 6f |Last time we loo| 00000010 6b 65 64 20 61 74 20 68 6f 77 20 74 6f 20 70 61 |ked at how to pa| 00000020 73 73 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 |ss command line | 00000030 61 72 67 75 6d 65 6e 74 73 20 74 6f 20 6f 75 72 |arguments to our| 00000040 20 70 72 6f 67 72 61 6d 2c 20 61 6e 64 20 6d 61 | program, and ma| 00000050 64 65 20 69 74 20 61 63 63 65 70 74 20 69 6e 70 |de it accept inp| 00000060 75 74 20 61 6e 64 20 6f 75 74 70 75 74 20 66 69 |ut and output fi| 00000070 6c 65 20 6e 61 6d 65 73 2e 20 20 57 65 20 61 72 |le names. We ar| 00000080 65 20 6e 6f 77 20 69 6e 20 61 20 70 6f 73 69 74 |e now in a posit| 00000090 69 6f 6e 20 74 6f 20 67 72 65 61 74 6c 79 20 65 |ion to greatly e| 000000a0 78 74 65 6e 74 20 74 68 69 73 20 66 65 61 74 75 |xtent this featu| 000000b0 72 65 2c 20 61 6e 64 20 69 6d 70 6c 65 6d 65 6e |re, and implemen| 000000c0 74 20 73 6f 6d 65 20 6d 6f 72 65 20 6f 70 74 69 |t some more opti| 000000d0 6f 6e 73 2c 20 73 75 63 68 20 61 73 20 63 6f 6e |ons, such as con| 000000e0 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 72 65 63 |trolling the rec| 000000f0 6f 67 6e 69 74 69 6f 6e 20 6f 66 20 75 70 70 65 |ognition of uppe| 00000100 72 20 61 6e 64 20 6c 6f 77 65 72 20 63 61 73 65 |r and lower case| 00000110 20 6c 65 74 74 65 72 73 2c 20 74 68 65 20 6d 69 | letters, the mi| 00000120 6e 69 6d 75 6d 20 77 6f 72 64 20 6c 65 6e 67 74 |nimum word lengt| 00000130 68 2c 20 61 6e 64 20 74 68 65 20 66 6f 72 6d 61 |h, and the forma| 00000140 74 20 6f 66 20 74 68 65 20 6f 75 74 70 75 74 20 |t of the output | 00000150 66 69 6c 65 2c 20 65 74 63 2e 20 20 54 6f 20 64 |file, etc. To d| 00000160 6f 20 74 68 69 73 20 77 65 20 6e 65 65 64 20 61 |o this we need a| 00000170 20 6d 65 74 68 6f 64 20 6f 66 20 68 61 6e 64 6c | method of handl| 00000180 69 6e 67 20 61 20 76 61 72 69 61 62 6c 65 20 6e |ing a variable n| 00000190 75 6d 62 65 72 20 6f 66 20 63 6f 6d 6d 61 6e 64 |umber of command| 000001a0 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73 2c | line arguments,| 000001b0 20 73 75 70 70 6c 69 65 64 20 69 6e 20 61 6e 79 | supplied in any| 000001c0 20 6f 72 64 65 72 2e | order.| 000001c7