Home » Archimedes archive » Zipped Apps » 1st Word Plus » WP/programs/LetterDate
WP/programs/LetterDate
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 » Archimedes archive » Zipped Apps » 1st Word Plus |
Filename: | WP/programs/LetterDate |
Read OK: | ✔ |
File size: | 1010 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > $.1ST_WP.LetterDate 20 30REM ********************************************************************* 40REM * * 50REM * This program is to be used with 1st Word Plus on the Arc. * 60REM * * 70REM * Its purpose is to put today's date in a file called 'format'. * 80REM * * 90REM * To use it, you must first prepare a file in the 'doc' directory * 100REM * called LetterBlnk. This file should contain your address, any * 110REM * logo you want and the date in this form: * 120REM * Wednesday 31st September 1999 * 130REM * The reason for using Wednesday and September is that these are * 140REM * the longest names of days and months respectively. * 150REM * * 160REM * The program will then change this date to today's date, in the * 170REM * same format. The resulting file will then be saved in the 'doc' * 180REM * directory with the name 'format'. * 190REM * * 200REM * When you create any new file in 1st Word Plus, it calls up any * 210REM * file withthe name 'format' and loads it in at the start... * 220REM * The resulting date is fixed and will not change if you want to * 230REM * reprint the letter at a leter date (a fault of the "letterdate" * 240REM * feature within 1st Mail Plus). * 250REM * * 260REM * You should put this program in your Library directory on the 1st * 270REM * Word Plus !BOOT disc and also amend the !BOOT program to include * 280REM * this command: * 290REM * *key 1 QUIT|MLetterdate|MIstWord+|M * 300REM * This will update the 'format' file each time you start up 1st * 310REM * Word Plus to the current date. * 320REM * * 330REM ********************************************************************* 340 350DIM O%50 360 370REM First find the length of LetterBlnk and put in L% 380Source$="$.1wp.doc.LetterBlnk" 390PROCOsFile(Source$) 400IF A%=0 PRINT''"Cannot find the file: "Source$' : END 410 420REM Load the LetterBlnk file and find where 'Wednesday' is. 430L%=E% 440DIM File%L% 450OSCLI("L."+Source$+" "+STR$~File%) 460TheDay$="Wednesday" 470Day$="" 480FOR I%=0 TO L% 490A%=File%?I% 500Day$=Day$+CHR$A% ELSE Day$="" 510IF INSTR(TheDay$,Day$)=0 Day$="" 520IF NOT(Day$=TheDay$) : NEXT 540IF I%>=L% : PRINT'"Cannot find '"TheDay$"' in the file called "Source$"..." : END 550 560REM Save where 'Wednesday' was found 570Date%=I%-LEN(Day$)+1 580I%=L% : NEXT : REM A tidy up job! 590 600REM Get the current date and convert it to the desired format. 610DIM T% 25, D% 50 620?T%=3 630SYS "OS_Word" ,14,T% 640S%=100 : DIMB%S% 650Design$="%WE%0%ZDY%ST%0%MO%0%CE%YR%0"+CHR$(0) 660$D%=Design$ 670SYS "OS_ConvertDateAndTime" ,T%,B%,S%,D% TO X%,Y%,Z% 680K%=X% 690Date$="" 700FORI%=X% TO Y% 710IF?I%=0 ?I%=13: IFI%<Y% Date$=Date$+$K%+" " : K%=I%+1 720NEXT 730 740REM Replace the old date with the current date. 750I%=Date% 760REPEATI%=I%+1 770UNTILFile%?I%=&A 780DateEnd%=I%-1 790$(File%+Date%)=LEFT$(Date$,LEN(Date$)-1) 800$(File%+Date%+LEN(Date$)-1)=STRING$(DateEnd%-Date%-LEN(Date$)+1,CHR$(&1E)) 810?(File%+DateEnd%)=&A 820 830REM Save the file with the name 'format'. 840Output$="$.1wp.doc.format" 850PROCOsFile(Output$) : IFA% OSCLI("ACC."+Output$+" WR") 860OSCLI("S."+Output$+" "+STR$~File%+"+"+STR$~L%) 870GOTO960 880 890DEF PROCOsFile(A$) REM Checks if the file A$ exists. 900$O%=A$ 910R%=5 920SYS "OS_File" ,R%,O% TO A%,B%,C%,D%,E% 930ENDPROC 940 950REM Debugging routines. 960*K.0F.I%=File%TOFile%+L%:P%=?I%:IFP%>31 ANDP%<127 P.CHR$(P%)" ";:N.:P. ELSEN.:P.|M 970*K.1FOR I%=Date% TO Date%+100: P.;?I%" ";:N.|M 980*K.2OSCLI("DEL."+Output$)|M 990*K.3OSCLI("DUMP "+Output$)|M 1000*K.4OSCLI("DUMP "+Source$)|M
� > $.1ST_WP.LetterDate K� ********************************************************************* (K� * * 2K� * This program is to be used with 1st Word Plus on the Arc. * <K� * * FK� * Its purpose is to put today's date in a file called 'format'. * PK� * * ZK� * To use it, you must first prepare a file in the 'doc' directory * dK� * called LetterBlnk. This file should contain your address, any * nK� * logo you want and the date in this form: * xK� * Wednesday 31st September 1999 * �K� * The reason for using Wednesday and September is that these are * �K� * the longest names of days and months respectively. * �K� * * �K� * The program will then change this date to today's date, in the * �K� * same format. The resulting file will then be saved in the 'doc' * �K� * directory with the name 'format'. * �K� * * �K� * When you create any new file in 1st Word Plus, it calls up any * �K� * file withthe name 'format' and loads it in at the start... * �K� * The resulting date is fixed and will not change if you want to * �K� * reprint the letter at a leter date (a fault of the "letterdate" * �K� * feature within 1st Mail Plus). * �K� * * K� * You should put this program in your Library directory on the 1st * K� * Word Plus !BOOT disc and also amend the !BOOT program to include * K� * this command: * "K� * *key 1 QUIT|MLetterdate|MIstWord+|M * ,K� * This will update the 'format' file each time you start up 1st * 6K� * Word Plus to the current date. * @K� * * JK� ********************************************************************* T ^ � O%50 h r7� First find the length of LetterBlnk and put in L% |"Source$="$.1wp.doc.LetterBlnk" ��OsFile(Source$) �2� A%=0 �''"Cannot find the file: "Source$' : � � �=� Load the LetterBlnk file and find where 'Wednesday' is. � L%=E% � � File%L% ��("L."+Source$+" "+�~File%) �TheDay$="Wednesday" �Day$="" �� I%=0 � L% �A%=File%?I% �Day$=Day$+�A% � Day$="" �� �TheDay$,Day$)=0 Day$="" � �(Day$=TheDay$) : � N� I%>=L% : �'"Cannot find '"TheDay$"' in the file called "Source$"..." : � & 0&� Save where 'Wednesday' was found :Date%=I%-�(Day$)+1 D I%=L% : � : � A tidy up job! N X@� Get the current date and convert it to the desired format. b� T% 25, D% 50 l ?T%=3 vș "OS_Word" ,14,T% �S%=100 : �B%S% �.Design$="%WE%0%ZDY%ST%0%MO%0%CE%YR%0"+�(0) �$D%=Design$ �6ș "OS_ConvertDateAndTime" ,T%,B%,S%,D% � X%,Y%,Z% � K%=X% �Date$="" ��I%=X% � Y% �7�?I%=0 ?I%=13: �I%<Y% Date$=Date$+$K%+" " : K%=I%+1 �� � �1� Replace the old date with the current date. �I%=Date% ��I%=I%+1 �File%?I%=&A DateEnd%=I%-1 %$(File%+Date%)=�Date$,�(Date$)-1) @$(File%+Date%+�(Date$)-1)=�DateEnd%-Date%-�(Date$)+1,�(&1E)) *?(File%+DateEnd%)=&A 4 >+� Save the file with the name 'format'. HOutput$="$.1wp.doc.format" R2�OsFile(Output$) : �A% �("ACC."+Output$+" WR") \(�("S."+Output$+" "+�~File%+"+"+�~L%) f �d@C p z1� �OsFile(A$) � Checks if the file A$ exists. � $O%=A$ �R%=5 �(ș "OS_File" ,R%,O% � A%,B%,C%,D%,E% �� � �� Debugging routines. �V*K.0F.I%=File%TOFile%+L%:P%=?I%:IFP%>31 ANDP%<127 P.CHR$(P%)" ";:N.:P. ELSEN.:P.|M �2*K.1FOR I%=Date% TO Date%+100: P.;?I%" ";:N.|M �*K.2OSCLI("DEL."+Output$)|M � *K.3OSCLI("DUMP "+Output$)|M � *K.4OSCLI("DUMP "+Source$)|M �
00000000 0d 00 0a 1b f4 20 3e 20 24 2e 31 53 54 5f 57 50 |..... > $.1ST_WP| 00000010 2e 4c 65 74 74 65 72 44 61 74 65 0d 00 14 04 0d |.LetterDate.....| 00000020 00 1e 4b f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |..K. ***********| 00000030 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000060 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 00 28 4b f4 20 |**********..(K. | 00000070 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |* | 00000080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000000b0 20 20 20 20 2a 0d 00 32 4b f4 20 2a 20 54 68 69 | *..2K. * Thi| 000000c0 73 20 70 72 6f 67 72 61 6d 20 69 73 20 74 6f 20 |s program is to | 000000d0 62 65 20 75 73 65 64 20 77 69 74 68 20 31 73 74 |be used with 1st| 000000e0 20 57 6f 72 64 20 50 6c 75 73 20 6f 6e 20 74 68 | Word Plus on th| 000000f0 65 20 41 72 63 2e 20 20 20 20 20 20 20 20 20 2a |e Arc. *| 00000100 0d 00 3c 4b f4 20 2a 20 20 20 20 20 20 20 20 20 |..<K. * | 00000110 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000140 20 20 20 20 20 20 20 20 20 20 2a 0d 00 46 4b f4 | *..FK.| 00000150 20 2a 20 49 74 73 20 70 75 72 70 6f 73 65 20 69 | * Its purpose i| 00000160 73 20 74 6f 20 70 75 74 20 74 6f 64 61 79 27 73 |s to put today's| 00000170 20 64 61 74 65 20 69 6e 20 61 20 66 69 6c 65 20 | date in a file | 00000180 63 61 6c 6c 65 64 20 27 66 6f 72 6d 61 74 27 2e |called 'format'.| 00000190 20 20 20 20 20 2a 0d 00 50 4b f4 20 2a 20 20 20 | *..PK. * | 000001a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000001e0 2a 0d 00 5a 4b f4 20 2a 20 54 6f 20 75 73 65 20 |*..ZK. * To use | 000001f0 69 74 2c 20 79 6f 75 20 6d 75 73 74 20 66 69 72 |it, you must fir| 00000200 73 74 20 70 72 65 70 61 72 65 20 61 20 66 69 6c |st prepare a fil| 00000210 65 20 69 6e 20 74 68 65 20 27 64 6f 63 27 20 64 |e in the 'doc' d| 00000220 69 72 65 63 74 6f 72 79 20 20 20 2a 0d 00 64 4b |irectory *..dK| 00000230 f4 20 2a 20 63 61 6c 6c 65 64 20 4c 65 74 74 65 |. * called Lette| 00000240 72 42 6c 6e 6b 2e 20 20 54 68 69 73 20 66 69 6c |rBlnk. This fil| 00000250 65 20 73 68 6f 75 6c 64 20 63 6f 6e 74 61 69 6e |e should contain| 00000260 20 79 6f 75 72 20 61 64 64 72 65 73 73 2c 20 61 | your address, a| 00000270 6e 79 20 20 20 20 2a 0d 00 6e 4b f4 20 2a 20 6c |ny *..nK. * l| 00000280 6f 67 6f 20 79 6f 75 20 77 61 6e 74 20 61 6e 64 |ogo you want and| 00000290 20 74 68 65 20 64 61 74 65 20 69 6e 20 74 68 69 | the date in thi| 000002a0 73 20 66 6f 72 6d 3a 20 20 20 20 20 20 20 20 20 |s form: | 000002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000002c0 20 2a 0d 00 78 4b f4 20 2a 20 20 20 20 57 65 64 | *..xK. * Wed| 000002d0 6e 65 73 64 61 79 20 33 31 73 74 20 53 65 70 74 |nesday 31st Sept| 000002e0 65 6d 62 65 72 20 31 39 39 39 20 20 20 20 20 20 |ember 1999 | 000002f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000300 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d 00 82 | *...| 00000310 4b f4 20 2a 20 54 68 65 20 72 65 61 73 6f 6e 20 |K. * The reason | 00000320 66 6f 72 20 75 73 69 6e 67 20 57 65 64 6e 65 73 |for using Wednes| 00000330 64 61 79 20 61 6e 64 20 53 65 70 74 65 6d 62 65 |day and Septembe| 00000340 72 20 69 73 20 74 68 61 74 20 74 68 65 73 65 20 |r is that these | 00000350 61 72 65 20 20 20 20 2a 0d 00 8c 4b f4 20 2a 20 |are *...K. * | 00000360 74 68 65 20 6c 6f 6e 67 65 73 74 20 6e 61 6d 65 |the longest name| 00000370 73 20 6f 66 20 64 61 79 73 20 61 6e 64 20 6d 6f |s of days and mo| 00000380 6e 74 68 73 20 72 65 73 70 65 63 74 69 76 65 6c |nths respectivel| 00000390 79 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |y. | 000003a0 20 20 2a 0d 00 96 4b f4 20 2a 20 20 20 20 20 20 | *...K. * | 000003b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000003e0 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d 00 | *..| 000003f0 a0 4b f4 20 2a 20 54 68 65 20 70 72 6f 67 72 61 |.K. * The progra| 00000400 6d 20 77 69 6c 6c 20 74 68 65 6e 20 63 68 61 6e |m will then chan| 00000410 67 65 20 74 68 69 73 20 64 61 74 65 20 74 6f 20 |ge this date to | 00000420 74 6f 64 61 79 27 73 20 64 61 74 65 2c 20 69 6e |today's date, in| 00000430 20 74 68 65 20 20 20 20 2a 0d 00 aa 4b f4 20 2a | the *...K. *| 00000440 20 73 61 6d 65 20 66 6f 72 6d 61 74 2e 20 20 54 | same format. T| 00000450 68 65 20 72 65 73 75 6c 74 69 6e 67 20 66 69 6c |he resulting fil| 00000460 65 20 77 69 6c 6c 20 74 68 65 6e 20 62 65 20 73 |e will then be s| 00000470 61 76 65 64 20 69 6e 20 74 68 65 20 27 64 6f 63 |aved in the 'doc| 00000480 27 20 20 2a 0d 00 b4 4b f4 20 2a 20 64 69 72 65 |' *...K. * dire| 00000490 63 74 6f 72 79 20 77 69 74 68 20 74 68 65 20 6e |ctory with the n| 000004a0 61 6d 65 20 27 66 6f 72 6d 61 74 27 2e 20 20 20 |ame 'format'. | 000004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000004c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d | *.| 000004d0 00 be 4b f4 20 2a 20 20 20 20 20 20 20 20 20 20 |..K. * | 000004e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000510 20 20 20 20 20 20 20 20 20 2a 0d 00 c8 4b f4 20 | *...K. | 00000520 2a 20 57 68 65 6e 20 79 6f 75 20 63 72 65 61 74 |* When you creat| 00000530 65 20 61 6e 79 20 6e 65 77 20 66 69 6c 65 20 69 |e any new file i| 00000540 6e 20 31 73 74 20 57 6f 72 64 20 50 6c 75 73 2c |n 1st Word Plus,| 00000550 20 69 74 20 63 61 6c 6c 73 20 75 70 20 61 6e 79 | it calls up any| 00000560 20 20 20 20 2a 0d 00 d2 4b f4 20 2a 20 66 69 6c | *...K. * fil| 00000570 65 20 77 69 74 68 74 68 65 20 6e 61 6d 65 20 27 |e withthe name '| 00000580 66 6f 72 6d 61 74 27 20 61 6e 64 20 6c 6f 61 64 |format' and load| 00000590 73 20 69 74 20 69 6e 20 61 74 20 74 68 65 20 73 |s it in at the s| 000005a0 74 61 72 74 2e 2e 2e 20 20 20 20 20 20 20 20 2a |tart... *| 000005b0 0d 00 dc 4b f4 20 2a 20 54 68 65 20 72 65 73 75 |...K. * The resu| 000005c0 6c 74 69 6e 67 20 64 61 74 65 20 69 73 20 66 69 |lting date is fi| 000005d0 78 65 64 20 61 6e 64 20 77 69 6c 6c 20 6e 6f 74 |xed and will not| 000005e0 20 63 68 61 6e 67 65 20 69 66 20 79 6f 75 20 77 | change if you w| 000005f0 61 6e 74 20 74 6f 20 20 20 20 2a 0d 00 e6 4b f4 |ant to *...K.| 00000600 20 2a 20 72 65 70 72 69 6e 74 20 74 68 65 20 6c | * reprint the l| 00000610 65 74 74 65 72 20 61 74 20 61 20 6c 65 74 65 72 |etter at a leter| 00000620 20 64 61 74 65 20 28 61 20 66 61 75 6c 74 20 6f | date (a fault o| 00000630 66 20 74 68 65 20 22 6c 65 74 74 65 72 64 61 74 |f the "letterdat| 00000640 65 22 20 20 20 2a 0d 00 f0 4b f4 20 2a 20 66 65 |e" *...K. * fe| 00000650 61 74 75 72 65 20 77 69 74 68 69 6e 20 31 73 74 |ature within 1st| 00000660 20 4d 61 69 6c 20 50 6c 75 73 29 2e 20 20 20 20 | Mail Plus). | 00000670 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000690 2a 0d 00 fa 4b f4 20 2a 20 20 20 20 20 20 20 20 |*...K. * | 000006a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000006d0 20 20 20 20 20 20 20 20 20 20 20 2a 0d 01 04 4b | *...K| 000006e0 f4 20 2a 20 59 6f 75 20 73 68 6f 75 6c 64 20 70 |. * You should p| 000006f0 75 74 20 74 68 69 73 20 70 72 6f 67 72 61 6d 20 |ut this program | 00000700 69 6e 20 79 6f 75 72 20 4c 69 62 72 61 72 79 20 |in your Library | 00000710 64 69 72 65 63 74 6f 72 79 20 6f 6e 20 74 68 65 |directory on the| 00000720 20 31 73 74 20 20 2a 0d 01 0e 4b f4 20 2a 20 57 | 1st *...K. * W| 00000730 6f 72 64 20 50 6c 75 73 20 21 42 4f 4f 54 20 64 |ord Plus !BOOT d| 00000740 69 73 63 20 61 6e 64 20 61 6c 73 6f 20 61 6d 65 |isc and also ame| 00000750 6e 64 20 74 68 65 20 21 42 4f 4f 54 20 70 72 6f |nd the !BOOT pro| 00000760 67 72 61 6d 20 74 6f 20 69 6e 63 6c 75 64 65 20 |gram to include | 00000770 20 2a 0d 01 18 4b f4 20 2a 20 74 68 69 73 20 63 | *...K. * this c| 00000780 6f 6d 6d 61 6e 64 3a 20 20 20 20 20 20 20 20 20 |ommand: | 00000790 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000007b0 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d 01 22 | *.."| 000007c0 4b f4 20 2a 20 20 20 20 2a 6b 65 79 20 31 20 51 |K. * *key 1 Q| 000007d0 55 49 54 7c 4d 4c 65 74 74 65 72 64 61 74 65 7c |UIT|MLetterdate|| 000007e0 4d 49 73 74 57 6f 72 64 2b 7c 4d 20 20 20 20 20 |MIstWord+|M | 000007f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000800 20 20 20 20 20 20 20 2a 0d 01 2c 4b f4 20 2a 20 | *..,K. * | 00000810 54 68 69 73 20 77 69 6c 6c 20 75 70 64 61 74 65 |This will update| 00000820 20 74 68 65 20 27 66 6f 72 6d 61 74 27 20 66 69 | the 'format' fi| 00000830 6c 65 20 65 61 63 68 20 74 69 6d 65 20 79 6f 75 |le each time you| 00000840 20 73 74 61 72 74 20 75 70 20 31 73 74 20 20 20 | start up 1st | 00000850 20 20 2a 0d 01 36 4b f4 20 2a 20 57 6f 72 64 20 | *..6K. * Word | 00000860 50 6c 75 73 20 74 6f 20 74 68 65 20 63 75 72 72 |Plus to the curr| 00000870 65 6e 74 20 64 61 74 65 2e 20 20 20 20 20 20 20 |ent date. | 00000880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000890 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d 01 | *..| 000008a0 40 4b f4 20 2a 20 20 20 20 20 20 20 20 20 20 20 |@K. * | 000008b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000008e0 20 20 20 20 20 20 20 20 2a 0d 01 4a 4b f4 20 2a | *..JK. *| 000008f0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000930 2a 2a 2a 2a 0d 01 54 04 0d 01 5e 0a de 20 4f 25 |****..T...^.. O%| 00000940 35 30 0d 01 68 04 0d 01 72 37 f4 20 46 69 72 73 |50..h...r7. Firs| 00000950 74 20 66 69 6e 64 20 74 68 65 20 6c 65 6e 67 74 |t find the lengt| 00000960 68 20 6f 66 20 4c 65 74 74 65 72 42 6c 6e 6b 20 |h of LetterBlnk | 00000970 61 6e 64 20 70 75 74 20 69 6e 20 4c 25 0d 01 7c |and put in L%..|| 00000980 22 53 6f 75 72 63 65 24 3d 22 24 2e 31 77 70 2e |"Source$="$.1wp.| 00000990 64 6f 63 2e 4c 65 74 74 65 72 42 6c 6e 6b 22 0d |doc.LetterBlnk".| 000009a0 01 86 14 f2 4f 73 46 69 6c 65 28 53 6f 75 72 63 |....OsFile(Sourc| 000009b0 65 24 29 0d 01 90 32 e7 20 41 25 3d 30 20 f1 27 |e$)...2. A%=0 .'| 000009c0 27 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 74 68 |'"Cannot find th| 000009d0 65 20 66 69 6c 65 3a 20 22 53 6f 75 72 63 65 24 |e file: "Source$| 000009e0 27 20 3a 20 e0 0d 01 9a 04 0d 01 a4 3d f4 20 4c |' : ........=. L| 000009f0 6f 61 64 20 74 68 65 20 4c 65 74 74 65 72 42 6c |oad the LetterBl| 00000a00 6e 6b 20 66 69 6c 65 20 61 6e 64 20 66 69 6e 64 |nk file and find| 00000a10 20 77 68 65 72 65 20 27 57 65 64 6e 65 73 64 61 | where 'Wednesda| 00000a20 79 27 20 69 73 2e 0d 01 ae 09 4c 25 3d 45 25 0d |y' is.....L%=E%.| 00000a30 01 b8 0d de 20 46 69 6c 65 25 4c 25 0d 01 c2 1f |.... File%L%....| 00000a40 ff 28 22 4c 2e 22 2b 53 6f 75 72 63 65 24 2b 22 |.("L."+Source$+"| 00000a50 20 22 2b c3 7e 46 69 6c 65 25 29 0d 01 cc 17 54 | "+.~File%)....T| 00000a60 68 65 44 61 79 24 3d 22 57 65 64 6e 65 73 64 61 |heDay$="Wednesda| 00000a70 79 22 0d 01 d6 0b 44 61 79 24 3d 22 22 0d 01 e0 |y"....Day$=""...| 00000a80 0f e3 20 49 25 3d 30 20 b8 20 4c 25 0d 01 ea 0f |.. I%=0 . L%....| 00000a90 41 25 3d 46 69 6c 65 25 3f 49 25 0d 01 f4 1b 44 |A%=File%?I%....D| 00000aa0 61 79 24 3d 44 61 79 24 2b bd 41 25 20 8b 20 44 |ay$=Day$+.A% . D| 00000ab0 61 79 24 3d 22 22 0d 01 fe 1e e7 20 a7 54 68 65 |ay$=""..... .The| 00000ac0 44 61 79 24 2c 44 61 79 24 29 3d 30 20 44 61 79 |Day$,Day$)=0 Day| 00000ad0 24 3d 22 22 0d 02 08 19 e7 20 ac 28 44 61 79 24 |$=""..... .(Day$| 00000ae0 3d 54 68 65 44 61 79 24 29 20 3a 20 ed 0d 02 1c |=TheDay$) : ....| 00000af0 4e e7 20 49 25 3e 3d 4c 25 20 3a 20 f1 27 22 43 |N. I%>=L% : .'"C| 00000b00 61 6e 6e 6f 74 20 66 69 6e 64 20 27 22 54 68 65 |annot find '"The| 00000b10 44 61 79 24 22 27 20 69 6e 20 74 68 65 20 66 69 |Day$"' in the fi| 00000b20 6c 65 20 63 61 6c 6c 65 64 20 22 53 6f 75 72 63 |le called "Sourc| 00000b30 65 24 22 2e 2e 2e 22 20 3a 20 e0 0d 02 26 05 20 |e$"..." : ...&. | 00000b40 0d 02 30 26 f4 20 53 61 76 65 20 77 68 65 72 65 |..0&. Save where| 00000b50 20 27 57 65 64 6e 65 73 64 61 79 27 20 77 61 73 | 'Wednesday' was| 00000b60 20 66 6f 75 6e 64 0d 02 3a 16 44 61 74 65 25 3d | found..:.Date%=| 00000b70 49 25 2d a9 28 44 61 79 24 29 2b 31 0d 02 44 20 |I%-.(Day$)+1..D | 00000b80 49 25 3d 4c 25 20 3a 20 ed 20 3a 20 f4 20 41 20 |I%=L% : . : . A | 00000b90 74 69 64 79 20 75 70 20 6a 6f 62 21 0d 02 4e 05 |tidy up job!..N.| 00000ba0 20 0d 02 58 40 f4 20 47 65 74 20 74 68 65 20 63 | ..X@. Get the c| 00000bb0 75 72 72 65 6e 74 20 64 61 74 65 20 61 6e 64 20 |urrent date and | 00000bc0 63 6f 6e 76 65 72 74 20 69 74 20 74 6f 20 74 68 |convert it to th| 00000bd0 65 20 64 65 73 69 72 65 64 20 66 6f 72 6d 61 74 |e desired format| 00000be0 2e 0d 02 62 12 de 20 54 25 20 32 35 2c 20 44 25 |...b.. T% 25, D%| 00000bf0 20 35 30 0d 02 6c 09 3f 54 25 3d 33 0d 02 76 17 | 50..l.?T%=3..v.| 00000c00 c8 99 20 22 4f 53 5f 57 6f 72 64 22 20 2c 31 34 |.. "OS_Word" ,14| 00000c10 2c 54 25 0d 02 80 12 53 25 3d 31 30 30 20 3a 20 |,T%....S%=100 : | 00000c20 de 42 25 53 25 0d 02 8a 2e 44 65 73 69 67 6e 24 |.B%S%....Design$| 00000c30 3d 22 25 57 45 25 30 25 5a 44 59 25 53 54 25 30 |="%WE%0%ZDY%ST%0| 00000c40 25 4d 4f 25 30 25 43 45 25 59 52 25 30 22 2b bd |%MO%0%CE%YR%0"+.| 00000c50 28 30 29 0d 02 94 0f 24 44 25 3d 44 65 73 69 67 |(0)....$D%=Desig| 00000c60 6e 24 0d 02 9e 36 c8 99 20 22 4f 53 5f 43 6f 6e |n$...6.. "OS_Con| 00000c70 76 65 72 74 44 61 74 65 41 6e 64 54 69 6d 65 22 |vertDateAndTime"| 00000c80 20 2c 54 25 2c 42 25 2c 53 25 2c 44 25 20 b8 20 | ,T%,B%,S%,D% . | 00000c90 58 25 2c 59 25 2c 5a 25 0d 02 a8 09 4b 25 3d 58 |X%,Y%,Z%....K%=X| 00000ca0 25 0d 02 b2 0c 44 61 74 65 24 3d 22 22 0d 02 bc |%....Date$=""...| 00000cb0 0f e3 49 25 3d 58 25 20 b8 20 59 25 0d 02 c6 37 |..I%=X% . Y%...7| 00000cc0 e7 3f 49 25 3d 30 20 3f 49 25 3d 31 33 3a 20 e7 |.?I%=0 ?I%=13: .| 00000cd0 49 25 3c 59 25 20 44 61 74 65 24 3d 44 61 74 65 |I%<Y% Date$=Date| 00000ce0 24 2b 24 4b 25 2b 22 20 22 20 3a 20 4b 25 3d 49 |$+$K%+" " : K%=I| 00000cf0 25 2b 31 0d 02 d0 05 ed 0d 02 da 05 20 0d 02 e4 |%+1......... ...| 00000d00 31 f4 20 52 65 70 6c 61 63 65 20 74 68 65 20 6f |1. Replace the o| 00000d10 6c 64 20 64 61 74 65 20 77 69 74 68 20 74 68 65 |ld date with the| 00000d20 20 63 75 72 72 65 6e 74 20 64 61 74 65 2e 0d 02 | current date...| 00000d30 ee 0c 49 25 3d 44 61 74 65 25 0d 02 f8 0c f5 49 |..I%=Date%.....I| 00000d40 25 3d 49 25 2b 31 0d 03 02 10 fd 46 69 6c 65 25 |%=I%+1.....File%| 00000d50 3f 49 25 3d 26 41 0d 03 0c 11 44 61 74 65 45 6e |?I%=&A....DateEn| 00000d60 64 25 3d 49 25 2d 31 0d 03 16 25 24 28 46 69 6c |d%=I%-1...%$(Fil| 00000d70 65 25 2b 44 61 74 65 25 29 3d c0 44 61 74 65 24 |e%+Date%)=.Date$| 00000d80 2c a9 28 44 61 74 65 24 29 2d 31 29 0d 03 20 40 |,.(Date$)-1).. @| 00000d90 24 28 46 69 6c 65 25 2b 44 61 74 65 25 2b a9 28 |$(File%+Date%+.(| 00000da0 44 61 74 65 24 29 2d 31 29 3d c4 44 61 74 65 45 |Date$)-1)=.DateE| 00000db0 6e 64 25 2d 44 61 74 65 25 2d a9 28 44 61 74 65 |nd%-Date%-.(Date| 00000dc0 24 29 2b 31 2c bd 28 26 31 45 29 29 0d 03 2a 18 |$)+1,.(&1E))..*.| 00000dd0 3f 28 46 69 6c 65 25 2b 44 61 74 65 45 6e 64 25 |?(File%+DateEnd%| 00000de0 29 3d 26 41 0d 03 34 05 20 0d 03 3e 2b f4 20 53 |)=&A..4. ..>+. S| 00000df0 61 76 65 20 74 68 65 20 66 69 6c 65 20 77 69 74 |ave the file wit| 00000e00 68 20 74 68 65 20 6e 61 6d 65 20 27 66 6f 72 6d |h the name 'form| 00000e10 61 74 27 2e 0d 03 48 1e 4f 75 74 70 75 74 24 3d |at'...H.Output$=| 00000e20 22 24 2e 31 77 70 2e 64 6f 63 2e 66 6f 72 6d 61 |"$.1wp.doc.forma| 00000e30 74 22 0d 03 52 32 f2 4f 73 46 69 6c 65 28 4f 75 |t"..R2.OsFile(Ou| 00000e40 74 70 75 74 24 29 20 3a 20 e7 41 25 20 ff 28 22 |tput$) : .A% .("| 00000e50 41 43 43 2e 22 2b 4f 75 74 70 75 74 24 2b 22 20 |ACC."+Output$+" | 00000e60 57 52 22 29 0d 03 5c 28 ff 28 22 53 2e 22 2b 4f |WR")..\(.("S."+O| 00000e70 75 74 70 75 74 24 2b 22 20 22 2b c3 7e 46 69 6c |utput$+" "+.~Fil| 00000e80 65 25 2b 22 2b 22 2b c3 7e 4c 25 29 0d 03 66 09 |e%+"+"+.~L%)..f.| 00000e90 e5 8d 64 40 43 0d 03 70 05 20 0d 03 7a 31 dd 20 |..d@C..p. ..z1. | 00000ea0 f2 4f 73 46 69 6c 65 28 41 24 29 20 f4 20 43 68 |.OsFile(A$) . Ch| 00000eb0 65 63 6b 73 20 69 66 20 74 68 65 20 66 69 6c 65 |ecks if the file| 00000ec0 20 41 24 20 65 78 69 73 74 73 2e 0d 03 84 0a 24 | A$ exists.....$| 00000ed0 4f 25 3d 41 24 0d 03 8e 08 52 25 3d 35 0d 03 98 |O%=A$....R%=5...| 00000ee0 28 c8 99 20 22 4f 53 5f 46 69 6c 65 22 20 2c 52 |(.. "OS_File" ,R| 00000ef0 25 2c 4f 25 20 b8 20 41 25 2c 42 25 2c 43 25 2c |%,O% . A%,B%,C%,| 00000f00 44 25 2c 45 25 0d 03 a2 05 e1 0d 03 ac 04 0d 03 |D%,E%...........| 00000f10 b6 19 f4 20 44 65 62 75 67 67 69 6e 67 20 72 6f |... Debugging ro| 00000f20 75 74 69 6e 65 73 2e 0d 03 c0 56 2a 4b 2e 30 46 |utines....V*K.0F| 00000f30 2e 49 25 3d 46 69 6c 65 25 54 4f 46 69 6c 65 25 |.I%=File%TOFile%| 00000f40 2b 4c 25 3a 50 25 3d 3f 49 25 3a 49 46 50 25 3e |+L%:P%=?I%:IFP%>| 00000f50 33 31 20 41 4e 44 50 25 3c 31 32 37 20 50 2e 43 |31 ANDP%<127 P.C| 00000f60 48 52 24 28 50 25 29 22 20 22 3b 3a 4e 2e 3a 50 |HR$(P%)" ";:N.:P| 00000f70 2e 20 45 4c 53 45 4e 2e 3a 50 2e 7c 4d 0d 03 ca |. ELSEN.:P.|M...| 00000f80 32 2a 4b 2e 31 46 4f 52 20 49 25 3d 44 61 74 65 |2*K.1FOR I%=Date| 00000f90 25 20 54 4f 20 44 61 74 65 25 2b 31 30 30 3a 20 |% TO Date%+100: | 00000fa0 50 2e 3b 3f 49 25 22 20 22 3b 3a 4e 2e 7c 4d 0d |P.;?I%" ";:N.|M.| 00000fb0 03 d4 1f 2a 4b 2e 32 4f 53 43 4c 49 28 22 44 45 |...*K.2OSCLI("DE| 00000fc0 4c 2e 22 2b 4f 75 74 70 75 74 24 29 7c 4d 0d 03 |L."+Output$)|M..| 00000fd0 de 20 2a 4b 2e 33 4f 53 43 4c 49 28 22 44 55 4d |. *K.3OSCLI("DUM| 00000fe0 50 20 22 2b 4f 75 74 70 75 74 24 29 7c 4d 0d 03 |P "+Output$)|M..| 00000ff0 e8 20 2a 4b 2e 34 4f 53 43 4c 49 28 22 44 55 4d |. *K.4OSCLI("DUM| 00001000 50 20 22 2b 53 6f 75 72 63 65 24 29 7c 4d 0d ff |P "+Source$)|M..| 00001010