Home » Archimedes archive » Apps » PipeDream 4 (1991) (Colton Software) (Examples Disc).adf » Custom/CF_sheets/c_ExpNum
Custom/CF_sheets/c_ExpNum
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 » Apps » PipeDream 4 (1991) (Colton Software) (Examples Disc).adf |
Filename: | Custom/CF_sheets/c_ExpNum |
Read OK: | ✔ |
File size: | 1086 bytes |
Load address: | FFFDDE43 |
Exec address: | 6D7E8F24 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Zipped Apps » PipeDream » Custom/CF_sheets/c_ExpNum
- Archimedes archive » Apps » PipeDream 4 (1991) (Colton Software) (Examples Disc).adf » Custom/CF_sheets/c_ExpNum
File contents
%OP%PL56 %OP%FX %OP%FY %OP%FS %OP%NDnstr,"511" %OP%NDft,12 %OP%NDzero_to_nine,b1b20 %OP%NDcurr_fig,6 %OP%NDzero_to_ninety,c1c10 %OP%NDnumber_str,"five hundred and eleven" %OP%NDspacer," " %OP%NDhdrds,"five hundred" %OP%NDneg,0 %OP%NDfst,"90" %OP%NDztn,b1b20 %OP%NDztnty,c1c10 %OP%NDdate_str,c10 %OP%NDsep," " %OP%NDsnd,"99" %OP%NDdate_str2,"ninety nine" %OP%NDadbc,"a.d." %OP%NDsuff,"" %OP%WC2,1354,788,1364,0,0,0,0 %OP%VS3.81 Test (Oct 8 1991), Colton Software - Development, R0123 4567 8901 2345 %CO:A,102,0%%V%%L%function("expand_number","arg:number","arg_2:text") %V%%L%set_name("nstr",string(@arg,0)) %V%%L%set_name("neg",0) %V%%L%if(left(nstr,1)="-") %V%%L%set_name("neg",1) %V%%L%set_name("nstr",mid(nstr,2,length(nstr)-1)) %V%%L%endif %V%%L%if(length(nstr)=4,result(expand_date(@arg,@arg_2)),) %V%%L%if(length(nstr)>3,result("Number too big"),) %V%%L%if(@arg=0,result("Zero"),) %V%%L%set_name("spacer",@arg_2) %V%%L%set_name("zero_to_nine",b1b20) %V%%L%set_name("zero_to_ninety",c1c10) %V%%L%set_name("number_str","") %V%%L%set_name("ft",value(right(nstr,2))+1) %V%%L%if(ft<=20 & ft>1,set_name("number_str",(index(zero_to_nine,1,ft))),) %V%%L%if(ft>20) %V%%L%set_name("curr_fig",value(mid(nstr,length(nstr)-1,1))+1) %V%%L%if(curr_fig>1,set_name("number_str",index(zero_to_ninety,1,curr_fig)),) %V%%L%set_name("curr_fig",value(mid(nstr,length(nstr),1))+1) %V%%L%if(curr_fig>1,set_name("number_str",join(number_str,spacer,index(zero_to_nine,1,curr_fig))),) %V%%L%endif %V%%L%set_name("curr_fig",value(mid(nstr,1,1))+1) %V%%L%if(length(nstr)=3,set_name("hdrds",join(index(zero_to_nine,1,curr_fig),spacer,"hundred")),set_name("hdrds","")) %V%%L%if(hdrds<>"") %V%%L%if(number_str<>"",set_name("number_str",join(hdrds,spacer,"and",spacer,number_str)),set_name("number_str",hdrds)) %V%%L%endif %V%%L%if(neg=1,set_name("number_str",join("minus",spacer,number_str)),) %V%%L%result(number_str) %V%%L%function("expand_date","arg:number","arg_2:text") %V%%L%set_name("nstr",string(@arg,0)) %V%%L%set_name("adbc","a.d.") %V%%L%if(left(nstr,1)="-") %V%%L%set_name("adbc","b.c.") %V%%L%set_name("nstr",mid(nstr,2,length(nstr)-1)) %V%%L%endif %V%%L%if(length(nstr)=1,set_name("nstr",join("000",nstr)),) %V%%L%if(length(nstr)=2,set_name("nstr",join("00",nstr)),) %V%%L%if(length(nstr)=3,set_name("nstr",join("0",nstr)),) %V%%L%if(length(nstr)<>4,result("Bad Year"),) %V%%L%set_name("fst",left(nstr,2)) %V%%L%set_name("snd",right(nstr,2)) %V%%L%set_name("sep",@arg_2) %V%%L%set_name("ztn",b1b20) %V%%L%set_name("ztnty",c1c10) %V%%L%set_name("date_str","") %V%%L%set_name("date_str2","") %V%%L%set_name("suff","") %V%%L%set_name("ft",value(fst)+1) %V%%L%if(ft<=20 & ft>1,set_name("date_str",(index(ztn,1,ft))),) %V%%L%if(ft>20) %V%%L%set_name("curr_fig",value(left(fst,1))+1) %V%%L%if(curr_fig>1,set_name("date_str",index(ztnty,1,curr_fig)),) %V%%L%set_name("curr_fig",value(right(fst,1))+1) %V%%L%if(curr_fig>1,set_name("date_str",join(date_str,sep,index(ztn,1,curr_fig))),) %V%%L%endif %V%%L%set_name("ft",value(snd)+1) %V%%L%if(ft<=20 & ft>1,set_name("date_str2",(index(ztn,1,ft))),) %V%%L%if(ft<11 & ft>1,set_name("date_str2",join("oh",sep,date_str2)),) %V%%L%if(ft>20) %V%%L%set_name("curr_fig",value(left(snd,1))+1) %V%%L%if(curr_fig>1,set_name("date_str2",index(ztnty,1,curr_fig)),) %V%%L%set_name("curr_fig",value(right(snd,1))+1) %V%%L%if(curr_fig>1,set_name("date_str2",join(date_str2,sep,index(ztn,1,curr_fig))),) %V%%L%endif %V%%L%if(left(snd,1)="0") %V%%L%if(right(snd,1)="0") %V%%L%if(value(right(fst,1))=0,set_name("date_str2","thousand"),set_name("date_str2","hundred")) %V%%L%if(value(right(fst,1))=0,set_name("date_str",index(ztn,1,value(left(fst,1))+1)),) %V%%L%else %V%%L%if(value(right(fst,1))=0,set_name("date_str2",join("thousand",sep,"and",sep,index(ztn,1,value(right(snd,1))+1))),) %V%%L%if(value(right(fst,1))=0,set_name("date_str",index(ztn,1,value(left(fst,1))+1)),) %V%%L%endif %V%%L%endif %V%%L%result(join(date_str,sep,date_str2,sep,adbc)) %CO:B,6,60%zero one two three four five six seven eight nine %L%ten %L%eleven %L%twelve %L%thirteen %L%fourteen %L%fifteen %L%sixteen %L%seventeen %L%eighteen %L%nineteen %CO:C,7,48%zero ten twenty %L%thirty %L%fourty %L%fifty %L%sixty seventy %L%eighty %L%ninety
00000000 25 4f 50 25 50 4c 35 36 0a 25 4f 50 25 46 58 0a |%OP%PL56.%OP%FX.| 00000010 25 4f 50 25 46 59 0a 25 4f 50 25 46 53 0a 25 4f |%OP%FY.%OP%FS.%O| 00000020 50 25 4e 44 6e 73 74 72 2c 22 35 31 31 22 0a 25 |P%NDnstr,"511".%| 00000030 4f 50 25 4e 44 66 74 2c 31 32 0a 25 4f 50 25 4e |OP%NDft,12.%OP%N| 00000040 44 7a 65 72 6f 5f 74 6f 5f 6e 69 6e 65 2c 62 31 |Dzero_to_nine,b1| 00000050 62 32 30 0a 25 4f 50 25 4e 44 63 75 72 72 5f 66 |b20.%OP%NDcurr_f| 00000060 69 67 2c 36 0a 25 4f 50 25 4e 44 7a 65 72 6f 5f |ig,6.%OP%NDzero_| 00000070 74 6f 5f 6e 69 6e 65 74 79 2c 63 31 63 31 30 0a |to_ninety,c1c10.| 00000080 25 4f 50 25 4e 44 6e 75 6d 62 65 72 5f 73 74 72 |%OP%NDnumber_str| 00000090 2c 22 66 69 76 65 20 68 75 6e 64 72 65 64 20 61 |,"five hundred a| 000000a0 6e 64 20 65 6c 65 76 65 6e 22 0a 25 4f 50 25 4e |nd eleven".%OP%N| 000000b0 44 73 70 61 63 65 72 2c 22 20 22 0a 25 4f 50 25 |Dspacer," ".%OP%| 000000c0 4e 44 68 64 72 64 73 2c 22 66 69 76 65 20 68 75 |NDhdrds,"five hu| 000000d0 6e 64 72 65 64 22 0a 25 4f 50 25 4e 44 6e 65 67 |ndred".%OP%NDneg| 000000e0 2c 30 0a 25 4f 50 25 4e 44 66 73 74 2c 22 39 30 |,0.%OP%NDfst,"90| 000000f0 22 0a 25 4f 50 25 4e 44 7a 74 6e 2c 62 31 62 32 |".%OP%NDztn,b1b2| 00000100 30 0a 25 4f 50 25 4e 44 7a 74 6e 74 79 2c 63 31 |0.%OP%NDztnty,c1| 00000110 63 31 30 0a 25 4f 50 25 4e 44 64 61 74 65 5f 73 |c10.%OP%NDdate_s| 00000120 74 72 2c 63 31 30 0a 25 4f 50 25 4e 44 73 65 70 |tr,c10.%OP%NDsep| 00000130 2c 22 20 22 0a 25 4f 50 25 4e 44 73 6e 64 2c 22 |," ".%OP%NDsnd,"| 00000140 39 39 22 0a 25 4f 50 25 4e 44 64 61 74 65 5f 73 |99".%OP%NDdate_s| 00000150 74 72 32 2c 22 6e 69 6e 65 74 79 20 6e 69 6e 65 |tr2,"ninety nine| 00000160 22 0a 25 4f 50 25 4e 44 61 64 62 63 2c 22 61 2e |".%OP%NDadbc,"a.| 00000170 64 2e 22 0a 25 4f 50 25 4e 44 73 75 66 66 2c 22 |d.".%OP%NDsuff,"| 00000180 22 0a 25 4f 50 25 57 43 32 2c 31 33 35 34 2c 37 |".%OP%WC2,1354,7| 00000190 38 38 2c 31 33 36 34 2c 30 2c 30 2c 30 2c 30 0a |88,1364,0,0,0,0.| 000001a0 25 4f 50 25 56 53 33 2e 38 31 20 54 65 73 74 20 |%OP%VS3.81 Test | 000001b0 28 4f 63 74 20 20 38 20 31 39 39 31 29 2c 20 43 |(Oct 8 1991), C| 000001c0 6f 6c 74 6f 6e 20 53 6f 66 74 77 61 72 65 20 2d |olton Software -| 000001d0 20 44 65 76 65 6c 6f 70 6d 65 6e 74 2c 20 52 30 | Development, R0| 000001e0 31 32 33 20 34 35 36 37 20 38 39 30 31 20 32 33 |123 4567 8901 23| 000001f0 34 35 0a 25 43 4f 3a 41 2c 31 30 32 2c 30 25 25 |45.%CO:A,102,0%%| 00000200 56 25 25 4c 25 66 75 6e 63 74 69 6f 6e 28 22 65 |V%%L%function("e| 00000210 78 70 61 6e 64 5f 6e 75 6d 62 65 72 22 2c 22 61 |xpand_number","a| 00000220 72 67 3a 6e 75 6d 62 65 72 22 2c 22 61 72 67 5f |rg:number","arg_| 00000230 32 3a 74 65 78 74 22 29 0a 25 56 25 25 4c 25 73 |2:text").%V%%L%s| 00000240 65 74 5f 6e 61 6d 65 28 22 6e 73 74 72 22 2c 73 |et_name("nstr",s| 00000250 74 72 69 6e 67 28 40 61 72 67 2c 30 29 29 0a 25 |tring(@arg,0)).%| 00000260 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 6e |V%%L%set_name("n| 00000270 65 67 22 2c 30 29 0a 25 56 25 25 4c 25 69 66 28 |eg",0).%V%%L%if(| 00000280 6c 65 66 74 28 6e 73 74 72 2c 31 29 3d 22 2d 22 |left(nstr,1)="-"| 00000290 29 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 |).%V%%L%set_name| 000002a0 28 22 6e 65 67 22 2c 31 29 0a 25 56 25 25 4c 25 |("neg",1).%V%%L%| 000002b0 73 65 74 5f 6e 61 6d 65 28 22 6e 73 74 72 22 2c |set_name("nstr",| 000002c0 6d 69 64 28 6e 73 74 72 2c 32 2c 6c 65 6e 67 74 |mid(nstr,2,lengt| 000002d0 68 28 6e 73 74 72 29 2d 31 29 29 0a 25 56 25 25 |h(nstr)-1)).%V%%| 000002e0 4c 25 65 6e 64 69 66 0a 25 56 25 25 4c 25 69 66 |L%endif.%V%%L%if| 000002f0 28 6c 65 6e 67 74 68 28 6e 73 74 72 29 3d 34 2c |(length(nstr)=4,| 00000300 72 65 73 75 6c 74 28 65 78 70 61 6e 64 5f 64 61 |result(expand_da| 00000310 74 65 28 40 61 72 67 2c 40 61 72 67 5f 32 29 29 |te(@arg,@arg_2))| 00000320 2c 29 0a 25 56 25 25 4c 25 69 66 28 6c 65 6e 67 |,).%V%%L%if(leng| 00000330 74 68 28 6e 73 74 72 29 3e 33 2c 72 65 73 75 6c |th(nstr)>3,resul| 00000340 74 28 22 4e 75 6d 62 65 72 20 74 6f 6f 20 62 69 |t("Number too bi| 00000350 67 22 29 2c 29 0a 25 56 25 25 4c 25 69 66 28 40 |g"),).%V%%L%if(@| 00000360 61 72 67 3d 30 2c 72 65 73 75 6c 74 28 22 5a 65 |arg=0,result("Ze| 00000370 72 6f 22 29 2c 29 0a 25 56 25 25 4c 25 73 65 74 |ro"),).%V%%L%set| 00000380 5f 6e 61 6d 65 28 22 73 70 61 63 65 72 22 2c 40 |_name("spacer",@| 00000390 61 72 67 5f 32 29 0a 25 56 25 25 4c 25 73 65 74 |arg_2).%V%%L%set| 000003a0 5f 6e 61 6d 65 28 22 7a 65 72 6f 5f 74 6f 5f 6e |_name("zero_to_n| 000003b0 69 6e 65 22 2c 62 31 62 32 30 29 0a 25 56 25 25 |ine",b1b20).%V%%| 000003c0 4c 25 73 65 74 5f 6e 61 6d 65 28 22 7a 65 72 6f |L%set_name("zero| 000003d0 5f 74 6f 5f 6e 69 6e 65 74 79 22 2c 63 31 63 31 |_to_ninety",c1c1| 000003e0 30 29 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d |0).%V%%L%set_nam| 000003f0 65 28 22 6e 75 6d 62 65 72 5f 73 74 72 22 2c 22 |e("number_str","| 00000400 22 29 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d |").%V%%L%set_nam| 00000410 65 28 22 66 74 22 2c 76 61 6c 75 65 28 72 69 67 |e("ft",value(rig| 00000420 68 74 28 6e 73 74 72 2c 32 29 29 2b 31 29 0a 25 |ht(nstr,2))+1).%| 00000430 56 25 25 4c 25 69 66 28 66 74 3c 3d 32 30 20 26 |V%%L%if(ft<=20 &| 00000440 20 66 74 3e 31 2c 73 65 74 5f 6e 61 6d 65 28 22 | ft>1,set_name("| 00000450 6e 75 6d 62 65 72 5f 73 74 72 22 2c 28 69 6e 64 |number_str",(ind| 00000460 65 78 28 7a 65 72 6f 5f 74 6f 5f 6e 69 6e 65 2c |ex(zero_to_nine,| 00000470 31 2c 66 74 29 29 29 2c 29 0a 25 56 25 25 4c 25 |1,ft))),).%V%%L%| 00000480 69 66 28 66 74 3e 32 30 29 0a 25 56 25 25 4c 25 |if(ft>20).%V%%L%| 00000490 73 65 74 5f 6e 61 6d 65 28 22 63 75 72 72 5f 66 |set_name("curr_f| 000004a0 69 67 22 2c 76 61 6c 75 65 28 6d 69 64 28 6e 73 |ig",value(mid(ns| 000004b0 74 72 2c 6c 65 6e 67 74 68 28 6e 73 74 72 29 2d |tr,length(nstr)-| 000004c0 31 2c 31 29 29 2b 31 29 0a 25 56 25 25 4c 25 69 |1,1))+1).%V%%L%i| 000004d0 66 28 63 75 72 72 5f 66 69 67 3e 31 2c 73 65 74 |f(curr_fig>1,set| 000004e0 5f 6e 61 6d 65 28 22 6e 75 6d 62 65 72 5f 73 74 |_name("number_st| 000004f0 72 22 2c 69 6e 64 65 78 28 7a 65 72 6f 5f 74 6f |r",index(zero_to| 00000500 5f 6e 69 6e 65 74 79 2c 31 2c 63 75 72 72 5f 66 |_ninety,1,curr_f| 00000510 69 67 29 29 2c 29 0a 25 56 25 25 4c 25 73 65 74 |ig)),).%V%%L%set| 00000520 5f 6e 61 6d 65 28 22 63 75 72 72 5f 66 69 67 22 |_name("curr_fig"| 00000530 2c 76 61 6c 75 65 28 6d 69 64 28 6e 73 74 72 2c |,value(mid(nstr,| 00000540 6c 65 6e 67 74 68 28 6e 73 74 72 29 2c 31 29 29 |length(nstr),1))| 00000550 2b 31 29 0a 25 56 25 25 4c 25 69 66 28 63 75 72 |+1).%V%%L%if(cur| 00000560 72 5f 66 69 67 3e 31 2c 73 65 74 5f 6e 61 6d 65 |r_fig>1,set_name| 00000570 28 22 6e 75 6d 62 65 72 5f 73 74 72 22 2c 6a 6f |("number_str",jo| 00000580 69 6e 28 6e 75 6d 62 65 72 5f 73 74 72 2c 73 70 |in(number_str,sp| 00000590 61 63 65 72 2c 69 6e 64 65 78 28 7a 65 72 6f 5f |acer,index(zero_| 000005a0 74 6f 5f 6e 69 6e 65 2c 31 2c 63 75 72 72 5f 66 |to_nine,1,curr_f| 000005b0 69 67 29 29 29 2c 29 0a 25 56 25 25 4c 25 65 6e |ig))),).%V%%L%en| 000005c0 64 69 66 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 |dif.%V%%L%set_na| 000005d0 6d 65 28 22 63 75 72 72 5f 66 69 67 22 2c 76 61 |me("curr_fig",va| 000005e0 6c 75 65 28 6d 69 64 28 6e 73 74 72 2c 31 2c 31 |lue(mid(nstr,1,1| 000005f0 29 29 2b 31 29 0a 25 56 25 25 4c 25 69 66 28 6c |))+1).%V%%L%if(l| 00000600 65 6e 67 74 68 28 6e 73 74 72 29 3d 33 2c 73 65 |ength(nstr)=3,se| 00000610 74 5f 6e 61 6d 65 28 22 68 64 72 64 73 22 2c 6a |t_name("hdrds",j| 00000620 6f 69 6e 28 69 6e 64 65 78 28 7a 65 72 6f 5f 74 |oin(index(zero_t| 00000630 6f 5f 6e 69 6e 65 2c 31 2c 63 75 72 72 5f 66 69 |o_nine,1,curr_fi| 00000640 67 29 2c 73 70 61 63 65 72 2c 22 68 75 6e 64 72 |g),spacer,"hundr| 00000650 65 64 22 29 29 2c 73 65 74 5f 6e 61 6d 65 28 22 |ed")),set_name("| 00000660 68 64 72 64 73 22 2c 22 22 29 29 0a 25 56 25 25 |hdrds","")).%V%%| 00000670 4c 25 69 66 28 68 64 72 64 73 3c 3e 22 22 29 0a |L%if(hdrds<>"").| 00000680 25 56 25 25 4c 25 69 66 28 6e 75 6d 62 65 72 5f |%V%%L%if(number_| 00000690 73 74 72 3c 3e 22 22 2c 73 65 74 5f 6e 61 6d 65 |str<>"",set_name| 000006a0 28 22 6e 75 6d 62 65 72 5f 73 74 72 22 2c 6a 6f |("number_str",jo| 000006b0 69 6e 28 68 64 72 64 73 2c 73 70 61 63 65 72 2c |in(hdrds,spacer,| 000006c0 22 61 6e 64 22 2c 73 70 61 63 65 72 2c 6e 75 6d |"and",spacer,num| 000006d0 62 65 72 5f 73 74 72 29 29 2c 73 65 74 5f 6e 61 |ber_str)),set_na| 000006e0 6d 65 28 22 6e 75 6d 62 65 72 5f 73 74 72 22 2c |me("number_str",| 000006f0 68 64 72 64 73 29 29 0a 25 56 25 25 4c 25 65 6e |hdrds)).%V%%L%en| 00000700 64 69 66 0a 25 56 25 25 4c 25 69 66 28 6e 65 67 |dif.%V%%L%if(neg| 00000710 3d 31 2c 73 65 74 5f 6e 61 6d 65 28 22 6e 75 6d |=1,set_name("num| 00000720 62 65 72 5f 73 74 72 22 2c 6a 6f 69 6e 28 22 6d |ber_str",join("m| 00000730 69 6e 75 73 22 2c 73 70 61 63 65 72 2c 6e 75 6d |inus",spacer,num| 00000740 62 65 72 5f 73 74 72 29 29 2c 29 0a 0a 25 56 25 |ber_str)),)..%V%| 00000750 25 4c 25 72 65 73 75 6c 74 28 6e 75 6d 62 65 72 |%L%result(number| 00000760 5f 73 74 72 29 0a 0a 0a 25 56 25 25 4c 25 66 75 |_str)...%V%%L%fu| 00000770 6e 63 74 69 6f 6e 28 22 65 78 70 61 6e 64 5f 64 |nction("expand_d| 00000780 61 74 65 22 2c 22 61 72 67 3a 6e 75 6d 62 65 72 |ate","arg:number| 00000790 22 2c 22 61 72 67 5f 32 3a 74 65 78 74 22 29 0a |","arg_2:text").| 000007a0 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 |%V%%L%set_name("| 000007b0 6e 73 74 72 22 2c 73 74 72 69 6e 67 28 40 61 72 |nstr",string(@ar| 000007c0 67 2c 30 29 29 0a 25 56 25 25 4c 25 73 65 74 5f |g,0)).%V%%L%set_| 000007d0 6e 61 6d 65 28 22 61 64 62 63 22 2c 22 61 2e 64 |name("adbc","a.d| 000007e0 2e 22 29 0a 25 56 25 25 4c 25 69 66 28 6c 65 66 |.").%V%%L%if(lef| 000007f0 74 28 6e 73 74 72 2c 31 29 3d 22 2d 22 29 0a 25 |t(nstr,1)="-").%| 00000800 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 61 |V%%L%set_name("a| 00000810 64 62 63 22 2c 22 62 2e 63 2e 22 29 0a 25 56 25 |dbc","b.c.").%V%| 00000820 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 6e 73 74 |%L%set_name("nst| 00000830 72 22 2c 6d 69 64 28 6e 73 74 72 2c 32 2c 6c 65 |r",mid(nstr,2,le| 00000840 6e 67 74 68 28 6e 73 74 72 29 2d 31 29 29 0a 25 |ngth(nstr)-1)).%| 00000850 56 25 25 4c 25 65 6e 64 69 66 0a 25 56 25 25 4c |V%%L%endif.%V%%L| 00000860 25 69 66 28 6c 65 6e 67 74 68 28 6e 73 74 72 29 |%if(length(nstr)| 00000870 3d 31 2c 73 65 74 5f 6e 61 6d 65 28 22 6e 73 74 |=1,set_name("nst| 00000880 72 22 2c 6a 6f 69 6e 28 22 30 30 30 22 2c 6e 73 |r",join("000",ns| 00000890 74 72 29 29 2c 29 0a 25 56 25 25 4c 25 69 66 28 |tr)),).%V%%L%if(| 000008a0 6c 65 6e 67 74 68 28 6e 73 74 72 29 3d 32 2c 73 |length(nstr)=2,s| 000008b0 65 74 5f 6e 61 6d 65 28 22 6e 73 74 72 22 2c 6a |et_name("nstr",j| 000008c0 6f 69 6e 28 22 30 30 22 2c 6e 73 74 72 29 29 2c |oin("00",nstr)),| 000008d0 29 0a 25 56 25 25 4c 25 69 66 28 6c 65 6e 67 74 |).%V%%L%if(lengt| 000008e0 68 28 6e 73 74 72 29 3d 33 2c 73 65 74 5f 6e 61 |h(nstr)=3,set_na| 000008f0 6d 65 28 22 6e 73 74 72 22 2c 6a 6f 69 6e 28 22 |me("nstr",join("| 00000900 30 22 2c 6e 73 74 72 29 29 2c 29 0a 25 56 25 25 |0",nstr)),).%V%%| 00000910 4c 25 69 66 28 6c 65 6e 67 74 68 28 6e 73 74 72 |L%if(length(nstr| 00000920 29 3c 3e 34 2c 72 65 73 75 6c 74 28 22 42 61 64 |)<>4,result("Bad| 00000930 20 59 65 61 72 22 29 2c 29 0a 25 56 25 25 4c 25 | Year"),).%V%%L%| 00000940 73 65 74 5f 6e 61 6d 65 28 22 66 73 74 22 2c 6c |set_name("fst",l| 00000950 65 66 74 28 6e 73 74 72 2c 32 29 29 0a 25 56 25 |eft(nstr,2)).%V%| 00000960 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 73 6e 64 |%L%set_name("snd| 00000970 22 2c 72 69 67 68 74 28 6e 73 74 72 2c 32 29 29 |",right(nstr,2))| 00000980 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 |.%V%%L%set_name(| 00000990 22 73 65 70 22 2c 40 61 72 67 5f 32 29 0a 25 56 |"sep",@arg_2).%V| 000009a0 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 7a 74 |%%L%set_name("zt| 000009b0 6e 22 2c 62 31 62 32 30 29 0a 25 56 25 25 4c 25 |n",b1b20).%V%%L%| 000009c0 73 65 74 5f 6e 61 6d 65 28 22 7a 74 6e 74 79 22 |set_name("ztnty"| 000009d0 2c 63 31 63 31 30 29 0a 25 56 25 25 4c 25 73 65 |,c1c10).%V%%L%se| 000009e0 74 5f 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 72 |t_name("date_str| 000009f0 22 2c 22 22 29 0a 25 56 25 25 4c 25 73 65 74 5f |","").%V%%L%set_| 00000a00 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 72 32 22 |name("date_str2"| 00000a10 2c 22 22 29 0a 25 56 25 25 4c 25 73 65 74 5f 6e |,"").%V%%L%set_n| 00000a20 61 6d 65 28 22 73 75 66 66 22 2c 22 22 29 0a 25 |ame("suff","").%| 00000a30 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 66 |V%%L%set_name("f| 00000a40 74 22 2c 76 61 6c 75 65 28 66 73 74 29 2b 31 29 |t",value(fst)+1)| 00000a50 0a 25 56 25 25 4c 25 69 66 28 66 74 3c 3d 32 30 |.%V%%L%if(ft<=20| 00000a60 20 26 20 66 74 3e 31 2c 73 65 74 5f 6e 61 6d 65 | & ft>1,set_name| 00000a70 28 22 64 61 74 65 5f 73 74 72 22 2c 28 69 6e 64 |("date_str",(ind| 00000a80 65 78 28 7a 74 6e 2c 31 2c 66 74 29 29 29 2c 29 |ex(ztn,1,ft))),)| 00000a90 0a 25 56 25 25 4c 25 69 66 28 66 74 3e 32 30 29 |.%V%%L%if(ft>20)| 00000aa0 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 |.%V%%L%set_name(| 00000ab0 22 63 75 72 72 5f 66 69 67 22 2c 76 61 6c 75 65 |"curr_fig",value| 00000ac0 28 6c 65 66 74 28 66 73 74 2c 31 29 29 2b 31 29 |(left(fst,1))+1)| 00000ad0 0a 25 56 25 25 4c 25 69 66 28 63 75 72 72 5f 66 |.%V%%L%if(curr_f| 00000ae0 69 67 3e 31 2c 73 65 74 5f 6e 61 6d 65 28 22 64 |ig>1,set_name("d| 00000af0 61 74 65 5f 73 74 72 22 2c 69 6e 64 65 78 28 7a |ate_str",index(z| 00000b00 74 6e 74 79 2c 31 2c 63 75 72 72 5f 66 69 67 29 |tnty,1,curr_fig)| 00000b10 29 2c 29 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 |),).%V%%L%set_na| 00000b20 6d 65 28 22 63 75 72 72 5f 66 69 67 22 2c 76 61 |me("curr_fig",va| 00000b30 6c 75 65 28 72 69 67 68 74 28 66 73 74 2c 31 29 |lue(right(fst,1)| 00000b40 29 2b 31 29 0a 25 56 25 25 4c 25 69 66 28 63 75 |)+1).%V%%L%if(cu| 00000b50 72 72 5f 66 69 67 3e 31 2c 73 65 74 5f 6e 61 6d |rr_fig>1,set_nam| 00000b60 65 28 22 64 61 74 65 5f 73 74 72 22 2c 6a 6f 69 |e("date_str",joi| 00000b70 6e 28 64 61 74 65 5f 73 74 72 2c 73 65 70 2c 69 |n(date_str,sep,i| 00000b80 6e 64 65 78 28 7a 74 6e 2c 31 2c 63 75 72 72 5f |ndex(ztn,1,curr_| 00000b90 66 69 67 29 29 29 2c 29 0a 25 56 25 25 4c 25 65 |fig))),).%V%%L%e| 00000ba0 6e 64 69 66 0a 0a 25 56 25 25 4c 25 73 65 74 5f |ndif..%V%%L%set_| 00000bb0 6e 61 6d 65 28 22 66 74 22 2c 76 61 6c 75 65 28 |name("ft",value(| 00000bc0 73 6e 64 29 2b 31 29 0a 25 56 25 25 4c 25 69 66 |snd)+1).%V%%L%if| 00000bd0 28 66 74 3c 3d 32 30 20 26 20 66 74 3e 31 2c 73 |(ft<=20 & ft>1,s| 00000be0 65 74 5f 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 |et_name("date_st| 00000bf0 72 32 22 2c 28 69 6e 64 65 78 28 7a 74 6e 2c 31 |r2",(index(ztn,1| 00000c00 2c 66 74 29 29 29 2c 29 0a 25 56 25 25 4c 25 69 |,ft))),).%V%%L%i| 00000c10 66 28 66 74 3c 31 31 20 26 20 66 74 3e 31 2c 73 |f(ft<11 & ft>1,s| 00000c20 65 74 5f 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 |et_name("date_st| 00000c30 72 32 22 2c 6a 6f 69 6e 28 22 6f 68 22 2c 73 65 |r2",join("oh",se| 00000c40 70 2c 64 61 74 65 5f 73 74 72 32 29 29 2c 29 0a |p,date_str2)),).| 00000c50 25 56 25 25 4c 25 69 66 28 66 74 3e 32 30 29 0a |%V%%L%if(ft>20).| 00000c60 25 56 25 25 4c 25 73 65 74 5f 6e 61 6d 65 28 22 |%V%%L%set_name("| 00000c70 63 75 72 72 5f 66 69 67 22 2c 76 61 6c 75 65 28 |curr_fig",value(| 00000c80 6c 65 66 74 28 73 6e 64 2c 31 29 29 2b 31 29 0a |left(snd,1))+1).| 00000c90 25 56 25 25 4c 25 69 66 28 63 75 72 72 5f 66 69 |%V%%L%if(curr_fi| 00000ca0 67 3e 31 2c 73 65 74 5f 6e 61 6d 65 28 22 64 61 |g>1,set_name("da| 00000cb0 74 65 5f 73 74 72 32 22 2c 69 6e 64 65 78 28 7a |te_str2",index(z| 00000cc0 74 6e 74 79 2c 31 2c 63 75 72 72 5f 66 69 67 29 |tnty,1,curr_fig)| 00000cd0 29 2c 29 0a 25 56 25 25 4c 25 73 65 74 5f 6e 61 |),).%V%%L%set_na| 00000ce0 6d 65 28 22 63 75 72 72 5f 66 69 67 22 2c 76 61 |me("curr_fig",va| 00000cf0 6c 75 65 28 72 69 67 68 74 28 73 6e 64 2c 31 29 |lue(right(snd,1)| 00000d00 29 2b 31 29 0a 25 56 25 25 4c 25 69 66 28 63 75 |)+1).%V%%L%if(cu| 00000d10 72 72 5f 66 69 67 3e 31 2c 73 65 74 5f 6e 61 6d |rr_fig>1,set_nam| 00000d20 65 28 22 64 61 74 65 5f 73 74 72 32 22 2c 6a 6f |e("date_str2",jo| 00000d30 69 6e 28 64 61 74 65 5f 73 74 72 32 2c 73 65 70 |in(date_str2,sep| 00000d40 2c 69 6e 64 65 78 28 7a 74 6e 2c 31 2c 63 75 72 |,index(ztn,1,cur| 00000d50 72 5f 66 69 67 29 29 29 2c 29 0a 25 56 25 25 4c |r_fig))),).%V%%L| 00000d60 25 65 6e 64 69 66 0a 0a 25 56 25 25 4c 25 69 66 |%endif..%V%%L%if| 00000d70 28 6c 65 66 74 28 73 6e 64 2c 31 29 3d 22 30 22 |(left(snd,1)="0"| 00000d80 29 0a 25 56 25 25 4c 25 69 66 28 72 69 67 68 74 |).%V%%L%if(right| 00000d90 28 73 6e 64 2c 31 29 3d 22 30 22 29 0a 25 56 25 |(snd,1)="0").%V%| 00000da0 25 4c 25 69 66 28 76 61 6c 75 65 28 72 69 67 68 |%L%if(value(righ| 00000db0 74 28 66 73 74 2c 31 29 29 3d 30 2c 73 65 74 5f |t(fst,1))=0,set_| 00000dc0 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 72 32 22 |name("date_str2"| 00000dd0 2c 22 74 68 6f 75 73 61 6e 64 22 29 2c 73 65 74 |,"thousand"),set| 00000de0 5f 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 72 32 |_name("date_str2| 00000df0 22 2c 22 68 75 6e 64 72 65 64 22 29 29 0a 25 56 |","hundred")).%V| 00000e00 25 25 4c 25 69 66 28 76 61 6c 75 65 28 72 69 67 |%%L%if(value(rig| 00000e10 68 74 28 66 73 74 2c 31 29 29 3d 30 2c 73 65 74 |ht(fst,1))=0,set| 00000e20 5f 6e 61 6d 65 28 22 64 61 74 65 5f 73 74 72 22 |_name("date_str"| 00000e30 2c 69 6e 64 65 78 28 7a 74 6e 2c 31 2c 76 61 6c |,index(ztn,1,val| 00000e40 75 65 28 6c 65 66 74 28 66 73 74 2c 31 29 29 2b |ue(left(fst,1))+| 00000e50 31 29 29 2c 29 0a 25 56 25 25 4c 25 65 6c 73 65 |1)),).%V%%L%else| 00000e60 0a 25 56 25 25 4c 25 69 66 28 76 61 6c 75 65 28 |.%V%%L%if(value(| 00000e70 72 69 67 68 74 28 66 73 74 2c 31 29 29 3d 30 2c |right(fst,1))=0,| 00000e80 73 65 74 5f 6e 61 6d 65 28 22 64 61 74 65 5f 73 |set_name("date_s| 00000e90 74 72 32 22 2c 6a 6f 69 6e 28 22 74 68 6f 75 73 |tr2",join("thous| 00000ea0 61 6e 64 22 2c 73 65 70 2c 22 61 6e 64 22 2c 73 |and",sep,"and",s| 00000eb0 65 70 2c 69 6e 64 65 78 28 7a 74 6e 2c 31 2c 76 |ep,index(ztn,1,v| 00000ec0 61 6c 75 65 28 72 69 67 68 74 28 73 6e 64 2c 31 |alue(right(snd,1| 00000ed0 29 29 2b 31 29 29 29 2c 29 0a 25 56 25 25 4c 25 |))+1))),).%V%%L%| 00000ee0 69 66 28 76 61 6c 75 65 28 72 69 67 68 74 28 66 |if(value(right(f| 00000ef0 73 74 2c 31 29 29 3d 30 2c 73 65 74 5f 6e 61 6d |st,1))=0,set_nam| 00000f00 65 28 22 64 61 74 65 5f 73 74 72 22 2c 69 6e 64 |e("date_str",ind| 00000f10 65 78 28 7a 74 6e 2c 31 2c 76 61 6c 75 65 28 6c |ex(ztn,1,value(l| 00000f20 65 66 74 28 66 73 74 2c 31 29 29 2b 31 29 29 2c |eft(fst,1))+1)),| 00000f30 29 0a 25 56 25 25 4c 25 65 6e 64 69 66 0a 25 56 |).%V%%L%endif.%V| 00000f40 25 25 4c 25 65 6e 64 69 66 0a 25 56 25 25 4c 25 |%%L%endif.%V%%L%| 00000f50 72 65 73 75 6c 74 28 6a 6f 69 6e 28 64 61 74 65 |result(join(date| 00000f60 5f 73 74 72 2c 73 65 70 2c 64 61 74 65 5f 73 74 |_str,sep,date_st| 00000f70 72 32 2c 73 65 70 2c 61 64 62 63 29 29 0a 25 43 |r2,sep,adbc)).%C| 00000f80 4f 3a 42 2c 36 2c 36 30 25 7a 65 72 6f 0a 6f 6e |O:B,6,60%zero.on| 00000f90 65 0a 74 77 6f 0a 74 68 72 65 65 0a 66 6f 75 72 |e.two.three.four| 00000fa0 0a 66 69 76 65 0a 73 69 78 0a 73 65 76 65 6e 0a |.five.six.seven.| 00000fb0 65 69 67 68 74 0a 6e 69 6e 65 0a 25 4c 25 74 65 |eight.nine.%L%te| 00000fc0 6e 0a 25 4c 25 65 6c 65 76 65 6e 0a 25 4c 25 74 |n.%L%eleven.%L%t| 00000fd0 77 65 6c 76 65 0a 25 4c 25 74 68 69 72 74 65 65 |welve.%L%thirtee| 00000fe0 6e 0a 25 4c 25 66 6f 75 72 74 65 65 6e 0a 25 4c |n.%L%fourteen.%L| 00000ff0 25 66 69 66 74 65 65 6e 0a 25 4c 25 73 69 78 74 |%fifteen.%L%sixt| 00001000 65 65 6e 0a 25 4c 25 73 65 76 65 6e 74 65 65 6e |een.%L%seventeen| 00001010 0a 25 4c 25 65 69 67 68 74 65 65 6e 0a 25 4c 25 |.%L%eighteen.%L%| 00001020 6e 69 6e 65 74 65 65 6e 0a 25 43 4f 3a 43 2c 37 |nineteen.%CO:C,7| 00001030 2c 34 38 25 7a 65 72 6f 0a 74 65 6e 0a 74 77 65 |,48%zero.ten.twe| 00001040 6e 74 79 0a 25 4c 25 74 68 69 72 74 79 0a 25 4c |nty.%L%thirty.%L| 00001050 25 66 6f 75 72 74 79 0a 25 4c 25 66 69 66 74 79 |%fourty.%L%fifty| 00001060 0a 25 4c 25 73 69 78 74 79 0a 73 65 76 65 6e 74 |.%L%sixty.sevent| 00001070 79 0a 25 4c 25 65 69 67 68 74 79 0a 25 4c 25 6e |y.%L%eighty.%L%n| 00001080 69 6e 65 74 79 0a |inety.| 00001086