Home » Archimedes archive » Acorn User » AU 1996-01.adf » Regulars » StarInfo/Shepherd/!ReadAge/!RunImage
StarInfo/Shepherd/!ReadAge/!RunImage
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 » Acorn User » AU 1996-01.adf » Regulars |
Filename: | StarInfo/Shepherd/!ReadAge/!RunImage |
Read OK: | ✔ |
File size: | B7E8 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10SYS"Hourglass_On" 20app_version$="0.8" 30PROCwimp_init 40PROCinit_sort 50PROCinit_draw 60SYS"Hourglass_Off" 70PROCpoll_loop 80END 120DEFPROCwimp_init 170ONERRORREPORT:PRINT" at line ";ERL/10:END 210DIMblk%&900,temp_blk%&900,errorblk%&100 250DIMworkstart%&2048 290workfree%=workstart% 300workend%=workstart%+&2048 340DIMmenu%600 360menu_end%=menu%+600 400DIMmenu_ind%100 420menu_ind_end%=menu_ind%+100 460app_name$="!ReadAge" 470app_purpose$="To be useful!!!!!!" 480app_directory$=FNsys_var("ReadAge$Dir") 500errorcount%=0 510false%=FALSE 550icon_bar%=-2 570select_click%=4 580adjust_click%=1 590select_drag%=64 600adjust_drag%=16 610menu_click%=2 630poll_mask%=0 640poll_mask%=poll_mask%OR1<<1 650poll_mask%=poll_mask%OR1<<4 660poll_mask%=poll_mask%OR1<<5 670poll_mask%=poll_mask%OR1<<11 680poll_mask%=poll_mask%OR1<<12 700sec=100 710min=60*sec 720SYS"OS_ReadMonotonicTime"TOpoll_time% 730auto_save_time%=5*min 740poll_time%+=auto_save_time% 750auto_remind%=TRUE 770quit%=FALSE 780sure%=FALSE 840ask_to_save%=FALSE 850file_icon%=1 860filename_icon%=2 870ok_icon%=3 890PROCdrag_init 930gpname_icon%=2 940name1_icon%=3 950name2_icon%=4 960dobd_icon%=5 970dobm_icon%=6 980doby_icon%=7 990ra1y_icon%=8 1000ra1m_icon%=9 1010ra2y_icon%=10 1020ra2m_icon%=11 1030tst1d_icon%=12 1040tst1m_icon%=13 1050tst1y_icon%=14 1060tst2d_icon%=15 1070tst2m_icon%=16 1080tst2y_icon%=17 1090noingp_icon%=18 1100nooftests_icon%=19 1110record_icon%=20 1120backward_icon%=21 1130add_icon%=22 1140search_icon%=23 1150take_icon%=24 1160forward_icon%=25 1170chage_icon%=26 1180ra1_icon%=27 1190ra2_icon%=28 1200tst1_icon%=29 1210tst2_icon%=30 1250discard_icon%=1 1260save_icon%=2 1270cancel_icon%=3 1310app_name_icon%=1 1320purpose_icon%=2 1330version_icon%=3 1370SortName1_icon%=2 1380SortName2_icon%=3 1390SortRA1C_icon%=4 1400SortRA2C_icon%=5 1410SortRA1_icon%=6 1420SortRA2_icon%=7 1430SortChr_icon%=8 1440SortCancel_icon%=10 1450SortOK_icon%=11 1490max_no_of_records%=61 1500no_of_records%=0 1510no_of_tests%=1 1520current_record%=0 1540group$="" 1550DIMname$(1,max_no_of_records%) 1560DIMdob%(2,max_no_of_records%) 1570DIMra%(1,1,max_no_of_records%) 1580DIMtest%(2,no_of_tests%) 1600ONERRORPROCerror:PROCquit 1650SYS"Wimp_Initialise",200,&4B534154,app_name$TOversion%,task_handle% 1690!temp_blk%=-1 1700temp_blk%!4=0 1710temp_blk%!8=0 1720temp_blk%!12=68 1730temp_blk%!16=68 1740temp_blk%!20=&1700202A 1750$(temp_blk%+24)=app_name$ 1760SYS"Wimp_CreateIcon",,temp_blk%TOicon_bar_handle% 1810main_window%=FNget_window_template(app_directory$+".Templates","Main",workfree%,workend%) 1820message_window%=FNget_window_template(app_directory$+".Templates","Message",workfree%,workend%) 1830saveas1_window%=FNget_window_template(app_directory$+".Templates","SaveAs1",workfree%,workend%) 1840saveas2_window%=FNget_window_template(app_directory$+".Templates","SaveAs2",workfree%,workend%) 1850saveas3_window%=FNget_window_template(app_directory$+".Templates","SaveAs3",workfree%,workend%) 1860about_window%=FNget_window_template(app_directory$+".Templates","About",workfree%,workend%) 1870goto_window%=FNget_window_template(app_directory$+".Templates","Goto",workfree%,workend%) 1880sort_window%=FNget_window_template(app_directory$+".Templates","Sort",workfree%,workend%) 1900name_opt_icon%=6 1910PROCselect_icon(saveas3_window%,name_opt_icon%) 1920dob_opt_icon%=7 1930PROCselect_icon(saveas3_window%,dob_opt_icon%) 1940ra1_opt_icon%=8 1950PROCselect_icon(saveas3_window%,ra1_opt_icon%) 1960ra2_opt_icon%=9 1970PROCselect_icon(saveas3_window%,ra2_opt_icon%) 1980aget_opt_icon%=10 1990PROCdeselect_icon(saveas3_window%,aget_opt_icon%) 2000age1_opt_icon%=11 2010PROCselect_icon(saveas3_window%,age1_opt_icon%) 2020age2_opt_icon%=12 2030PROCselect_icon(saveas3_window%,age2_opt_icon%) 2040tab_icon%=14 2050space_icon%=15 2060PROCselect_icon(saveas3_window%,space_icon%) 2070comma_icon%=16 2110PROCput_text(about_window%,app_name_icon%,app_name$) 2120PROCput_text(about_window%,version_icon%,app_version$) 2130PROCput_text(about_window%,purpose_icon%,app_purpose$) 2170PROCput_text(main_window%,noingp_icon%,STR$(no_of_records%+1)) 2180PROCput_text(main_window%,nooftests_icon%,STR$(no_of_tests%+1)) 2190PROCput_text(main_window%,record_icon%,STR$(current_record%+1)) 2230record_rad_icon%=2 2240record_wri_icon%=3 2250name_rad_icon%=4 2260name_wri_icon%=5 2270goto_cancel_icon%=8 2280goto_ok_icon%=7 2300PROCput_text(goto_window%,record_wri_icon%,"") 2310PROCput_text(goto_window%,name_wri_icon%,"") 2320PROCselect_icon(goto_window%,name_rad_icon%) 2330PROCshade_icon(goto_window%,record_wri_icon%) 2340PROCunshade_icon(goto_window%,name_wri_icon%) 2360PROCselect_icon(sort_window%,SortName1_icon%) 2380current_test%=0 2390PROCselect_test(1,TRUE) 2430icon_bar_menu%=FNdim_menu(menu%,menu_end%,2,100,app_name$) 2440PROCmenu_entry("Info",menu%,menu_ind%,menu_ind_end%,about_window%,FALSE,FALSE,FALSE,FALSE,FALSE) 2450PROCmenu_entry("Quit",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE) 2470add_icon_menu%=FNdim_menu(menu%,menu_end%,2,180,"Add record") 2480PROCmenu_entry("Before",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE) 2490PROCmenu_entry("After",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE) 2510search_menu%=FNdim_menu(menu%,menu_end%,2,180,"Query") 2520PROCmenu_entry("Find... F4",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE) 2530PROCmenu_entry("Sort F5",menu%,menu_ind%,menu_ind_end%,sort_window%,FALSE,FALSE,FALSE,FALSE,TRUE) 2550take_icon_menu%=FNdim_menu(menu%,menu_end%,2,180,"Delete") 2560PROCmenu_entry("Wipe",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE) 2570PROCmenu_entry("Remove",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE) 2590save_menu%=FNdim_menu(menu%,menu_end%,3,290,"Save") 2600PROCmenu_entry("Save data F3",menu%,menu_ind%,menu_ind_end%,saveas1_window%,FALSE,FALSE,FALSE,FALSE,FALSE) 2610PROCmenu_entry("Save graph ���F3",menu%,menu_ind%,menu_ind_end%,saveas2_window%,FALSE,FALSE,FALSE,FALSE,FALSE) 2620PROCmenu_entry("Save text� ��~F3",menu%,menu_ind%,menu_ind_end%,saveas3_window%,FALSE,FALSE,FALSE,FALSE,TRUE) 2640auto_menu%=FNdim_menu(menu%,menu_end%,1,200,"Time (mins)") 2650PROCmenu_entry(STR$(auto_save_time%/min),menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,6,FALSE,TRUE) 2670main_menu%=FNdim_menu(menu%,menu_end%,4,160,app_name$) 2680PROCmenu_entry("Info",menu%,menu_ind%,menu_ind_end%,about_window%,FALSE,TRUE,FALSE,FALSE,FALSE) 2690PROCmenu_entry("Save",menu%,menu_ind%,menu_ind_end%,save_menu%,FALSE,FALSE,FALSE,FALSE,FALSE) 2700PROCmenu_entry("Auto-save",menu%,menu_ind%,menu_ind_end%,auto_menu%,FALSE,TRUE,FALSE,FALSE,FALSE) 2710PROCmenu_entry("Wipe all",menu%,menu_ind%,menu_ind_end%,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE) 2730ENDPROC 2760DEFPROCpoll_loop 2780REPEAT 2790SYS"Wimp_PollIdle",poll_mask%,blk%,poll_time%TOevent% 2820CASEevent%OF 2830WHEN0 2840IFFNask2savePROCauto_save 2850SYS"OS_ReadMonotonicTime"TOpoll_time% 2860poll_time%+=auto_save_time% 2890WHEN2 2900SYS"Wimp_OpenWindow",,blk% 2920WHEN3 2930SYS"Wimp_CloseWindow",,blk% 2950WHEN6 2960PROCmouse_button 2980WHEN7 2990PROCdrag_over 3010WHEN8 3020PROCkey_press 3040WHEN9 3050PROCmenu_click 3070WHEN17 3080PROCmessage 3100WHEN18 3110PROCmessage 3120ENDCASE 3140IFquit%PROCcheck 3160UNTILsure% 3180PROCquit 3200ENDPROC 3280DEFFNsys_var(var$) 3290LOCALlenth% 3300SYS"XOS_ReadVarVal",var$+CHR$(0),temp_blk%,-1TO,,lenth% 3310IFlenth%=0ERROREXT0,"System variable '"+var$+"' not found!" 3320SYS"XOS_ReadVarVal",var$+CHR$(0),temp_blk%,255,,3TO,,lenth% 3330?(temp_blk%+lenth%)=13 3340=$temp_blk% 3370DEFPROCerror 3390errorcount%+=1 3400IFerrorcount%>5:ERROREXT0,"Too many errors!" 3420SYS"XWimp_CloseTemplate" 3430IFc%<>0THENCLOSE#c% 3440SYS"Hourglass_Smash" 3460!errorblk%=ERR 3470$(errorblk%+4)=REPORT$+" at line "+STR$(ERLDIV10) 3480SYS"Wimp_ReportError",errorblk%,1,app_name$ 3500ENDPROC 3530DEFPROCquit 3540SYS"Wimp_CloseDown",task_handle%,&4B534154 3550END 3560ENDPROC 3590DEFFNget_window_template(file$,name$,RETURNfree%,end%) 3610LOCALhandle%,found% 3620SYS"Wimp_OpenTemplate",,file$ 3630SYS"Wimp_LoadTemplate",,blk%,free%,end%,-1,name$,0TO,,free%,,,,found% 3640IFfound%THEN 3650SYS"Wimp_CreateWindow",,blk%TOhandle% 3660ELSE 3670ERROREXT0,"Window "+name$+" not found in template file!" 3680ENDIF 3690SYS"Wimp_CloseTemplate" 3700=handle% 3730DEFPROCput_text(window%,icon%,text$) 3740IFtext$="0"text$="" 3750temp_blk%!0=window% 3760temp_blk%!4=icon% 3770SYS"Wimp_GetIconState",,temp_blk% 3780IF(temp_blk%!24AND&101)<>&101THEN 3790ERROR202,"Icon "+STR$(icon%)+" not indirected!" 3800ENDPROC 3810ENDIF 3830text$=LEFT$(text$,temp_blk%!36-1) 3840$temp_blk%!28=text$ 3850temp_blk%!8=0 3860temp_blk%!12=0 3880SYS"Wimp_SetIconState",,temp_blk% 3890ENDPROC 3920DEFFNget_text(window%,icon%) 3930!temp_blk%=window% 3940temp_blk%!4=icon% 3950SYS"Wimp_GetIconState",,temp_blk% 3960IF(temp_blk%!24AND&101)<>&101THEN 3970ERROR202,"Icon "+STR$(icon%)+" not indirected!" 3980="" 3990ENDIF 4000=$temp_blk%!28 4030DEFPROCopen_window(window%) 4040!temp_blk%=window% 4050SYS"Wimp_GetWindowState",,temp_blk% 4060SYS"Wimp_OpenWindow",,temp_blk% 4070ENDPROC 4090DEFPROCmessage 4110LOCALclick% 4140CASEblk%!16OF 4160WHEN0 4170IFFNask2saveTHEN 4180click%=TRUE 4190PROCreport_error("The Current data is UNsaved. OK to save, CANCEL to quit.",TRUE,TRUE,click%) 4200IFclick%=1THEN 4210PROCopen_save_window(main_window%,saveas1_window%) 4220quit%=FALSE 4230ELSE 4240PROCquit 4250ENDIF 4260ELSE 4270PROCquit 4280ENDIF 4300WHEN1 4310PROCsave_request 4330WHEN3 4340PROCload_request 4360WHEN2 4370PROCsave_demand 4390WHEN5 4400IFblk%!40=&DFETHENPROCload_request 4420WHEN4 4430PROCclose_menu 4440ENDCASE 4460ENDPROC 4490DEFPROCmouse_button 4510mousex%=blk%!0 4520mousey%=blk%!4 4530mousebut%=blk%!8 4540window_handle%=blk%!12 4550icon_handle%=blk%!16 4570CASEwindow_handle%OF 4590WHENmain_window% 4600PROCmain_window_click 4620WHENicon_bar% 4630PROCicon_bar_click 4650WHENsaveas1_window%,saveas2_window%,saveas3_window% 4660PROCsave_window_click(window_handle%) 4680WHENgoto_window% 4690CASEicon_handle%OF 4700WHENgoto_ok_icon% 4710PROCgoto 4720PROCclose_menu 4730WHENgoto_cancel_icon% 4740PROCclose_menu 4750WHENrecord_rad_icon% 4760PROCselect_icon(goto_window%,icon_handle%) 4770PROCshade_icon(goto_window%,name_wri_icon%) 4780PROCunshade_icon(goto_window%,record_wri_icon%) 4790PROCset_caret(goto_window%,record_wri_icon%) 4800WHENname_rad_icon% 4810PROCselect_icon(goto_window%,icon_handle%) 4820PROCshade_icon(goto_window%,record_wri_icon%) 4830PROCunshade_icon(goto_window%,name_wri_icon%) 4840PROCset_caret(goto_window%,name_wri_icon%) 4850ENDCASE 4870WHENsort_window% 4880CASEicon_handle%OF 4890WHENSortCancel_icon% 4900PROCclose_menu 4910WHENSortOK_icon% 4920SYS"Hourglass_On" 4930PROCsave_record(current_record%) 4940IFFNselected(sort_window%,SortName1_icon%)PROCsort(no_of_records%,0,case%) 4950IFFNselected(sort_window%,SortName2_icon%)PROCsort(no_of_records%,1,case%) 4960IFFNselected(sort_window%,SortRA1_icon%)PROCsort(no_of_records%,2,case%) 4970IFFNselected(sort_window%,SortRA2_icon%)PROCsort(no_of_records%,3,case%) 4980IFFNselected(sort_window%,SortChr_icon%)PROCsort(no_of_records%,4,case%) 4990IFFNselected(sort_window%,SortRA1C_icon%)PROCsort(no_of_records%,5,case%) 5000IFFNselected(sort_window%,SortRA2C_icon%)PROCsort(no_of_records%,6,case%) 5010SYS"Hourglass_Off" 5020PROCclose_menu 5030PROCload_record(current_record%) 5040ask_to_save%=TRUE 5050ENDCASE 5070WHENmessage_window% 5080CASEicon_handle%OF 5090WHENcancel_icon% 5100PROCclose_menu 5110WHENsave_icon% 5120PROCopen_save_window(main_window%,saveas1_window%) 5130WHENdiscard_icon% 5140sure%=TRUE 5150ENDCASE 5170ENDCASE 5190ENDPROC 5220DEFPROCicon_bar_click 5240CASEmousebut%OF 5260WHENmenu_click% 5280current_menu%=icon_bar_menu% 5300menu_x%=mousex%-64 5320no_of_items%=2 5330no_of_dotted%=0 5350menu_y%=96+(no_of_items%*44)+(no_of_dotted%*24) 5370SYS"Wimp_CreateMenu",,current_menu%,menu_x%,menu_y% 5390WHENselect_click%,adjust_click% 5400PROCopen_window(main_window%):PROCset_caret(main_window%,name1_icon%) 5420ENDCASE 5440ENDPROC 5470DEFFNdim_menu(RETURNptr%,end%,no_of_items%,width%,title$) 5490IF(ptr%+28)+(no_of_items%*24)>end%ERROR0,"Menu overflow" 5500name%=ptr% 5510$ptr%=LEFT$(title$,12)+CHR$(0) 5520ptr%!12=7 5530ptr%!13=2 5540ptr%!14=7 5550ptr%!15=0 5560ptr%!16=width% 5570ptr%!20=44 5580ptr%!24=0 5590ptr%+=28 5600=ptr%-28 5630DEFPROCmenu_entry(text$,RETURNptr%,RETURNind_ptr%,end%,sub%,ticked%,dotted%,writable%,shaded%,last%) 5650LOCALmenuflag%,iconflag% 5660menuflag%=0 5670IFsub%=FALSEsub%=0 5680IFticked%menuflag%=menuflag%OR1<<0 5690IFdotted%menuflag%=menuflag%OR1<<1 5700IFwritable%menuflag%=menuflag%OR1<<2 5710IFlast%menuflag%=menuflag%OR1<<7 5730iconflag%=0 5740iconflag%=iconflag%OR1<<0 5750iconflag%=iconflag%OR1<<5 5760IFshaded%iconflag%=iconflag%OR1<<22 5770iconflag%=iconflag%OR7<<24 5790!ptr%=menuflag% 5800ptr%!4=sub% 5820IFLEN(text$)>12ORwritable%THEN 5830IFind_ptr%+LEN(text$)+1>end%ERROR0,"Indirected menu overflow" 5840$ind_ptr%=text$+CHR$(0) 5850ptr%!12=ind_ptr% 5860ind_ptr%+=LEN(text$)+1 5870IFwritable%THEN 5880$ind_ptr%="A0-9mins"+CHR$(0) 5890ptr%!16=ind_ptr% 5900ind_ptr%+=9 5910ptr%!20=writable% 5920ELSE 5930?ind_ptr%=0 5940ptr%!16=ind_ptr% 5950ind_ptr%+=1 5960ptr%!20=LEN(text$)+1 5970ENDIF 5980iconflag%=iconflag%OR1<<8 5990ELSE 6000$(ptr%+12)=LEFT$(text$,12)+CHR$(0) 6010ENDIF 6030ptr%!8=iconflag% 6050ptr%+=24 6070ENDPROC 6100DEFPROCmenu_click 6120LOCALi%,click% 6140menu$="" 6150i%=0 6170REPEAT 6180menu$=menu$+STR$(blk%!i%) 6190i%+=4 6200UNTILblk%!i% 6220CASEcurrent_menu%OF 6240WHENicon_bar_menu% 6250PROCicon_bar_menu 6270WHENmain_menu% 6280CASEmenu$OF 6290WHEN"2" 6300IFFNticked(main_menu%,2)THEN 6310PROCuntick_item(main_menu%,2) 6320ELSE 6330PROCtick_item(main_menu%,2) 6340ENDIF 6350WHEN"3" 6360PROCchk_wipe 6370WHEN"20" 6380PROCtick_item(main_menu%,2) 6390auto_save_time%=INT(VAL(FNget_writable(auto_menu%,0)))*min 6400IFauto_save_time%/min>99 auto_save_time%=5*min 6410IFauto_save_time%/min<1 auto_save_time%=5*min 6420SYS"OS_ReadMonotonicTime"TOpoll_time% 6430poll_time%+=auto_save_time% 6440ENDCASE 6460WHENadd_icon_menu% 6470PROCsave_record(current_record%) 6480CASEmenu$OF 6490WHEN"0" 6500PROCadd_record(current_record%,TRUE) 6510WHEN"1" 6520PROCadd_record(current_record%,FALSE) 6530current_record%+=1 6540ENDCASE 6550PROCput_text(main_window%,noingp_icon%,STR$(no_of_records%+1)) 6560PROCload_record(current_record%) 6580WHENsearch_menu% 6590CASEmenu$OF 6600WHEN"0" 6610PROCsave_record(current_record%) 6620PROCopen_save_window(main_window%,goto_window%) 6630IFFNselected(goto_window%,record_rad_icon%)PROCset_caret(goto_window%,record_wri_icon%)ELSEPROCset_caret(goto_window%,name_wri_icon%) 6640ENDCASE 6660WHENtake_icon_menu% 6670CASEmenu$OF 6680WHEN"0" 6690click%=TRUE 6700PROCreport_error("Are you sure you wish to wipe this record?",TRUE,TRUE,click%) 6710IFclick%=1PROCwipe_record 6720WHEN"1" 6730click%=TRUE 6740PROCreport_error("Are you sure you wish to remove this record?",TRUE,TRUE,click%) 6750IFclick%=1THEN 6760PROCremove_record(current_record%) 6770IFcurrent_record%>no_of_records%current_record%=no_of_records% 6780PROCput_text(main_window%,noingp_icon%,STR$(no_of_records%+1)) 6790PROCput_text(main_window%,record_icon%,STR$(current_record%+1)) 6800PROCload_record(current_record%) 6810ENDIF 6820ENDCASE 6830ENDCASE 6850SYS"Wimp_GetPointerInfo",,blk% 6860IFblk%!8=adjust_click%SYS"Wimp_CreateMenu",,current_menu%,menu_x%,menu_y% 6880ENDPROC 6910DEFPROCicon_bar_menu 6930CASEmenu$OF 6950WHEN"1" 6960quit%=TRUE 6980ENDCASE 7000ENDPROC 7030DEFPROCmain_window_click 7050LOCALopen% 7070CASEicon_handle%OF 7090WHENsearch_icon% 7100current_menu%=search_menu% 7110open%=TRUE 7130WHENadd_icon% 7140current_menu%=add_icon_menu% 7150open%=TRUE 7170WHENtake_icon% 7180current_menu%=take_icon_menu% 7190open%=TRUE 7210ENDCASE 7230IFmousebut%=menu_click%AND open%=FALSETHEN 7240PROCput_writable(auto_menu%,0,STR$(auto_save_time%/min)+"mins") 7250current_menu%=main_menu% 7260open%=TRUE 7270ENDIF 7290IFopen%THEN 7300menu_x%=mousex%-64 7310menu_y%=mousey% 7320SYS"Wimp_CreateMenu",,current_menu%,menu_x%,menu_y% 7330ENDPROC 7350ENDIF 7370CASEicon_handle%OF 7390WHENforward_icon% 7400IFmousebut%=select_click%PROCforwardELSEPROCbackward 7420WHENbackward_icon% 7430IFmousebut%=select_click%PROCbackwardELSEPROCforward 7450WHENra1_icon%,tst1_icon% 7460IFmousebut%=select_click%PROCselect_test(1,TRUE)ELSEPROCselect_test(2,TRUE) 7480WHENra2_icon%,tst2_icon% 7490IFmousebut%=select_click%PROCselect_test(2,TRUE)ELSEPROCselect_test(1,TRUE) 7510ENDCASE 7530ENDPROC 7560DEFPROCget_icon_state(window%,icon%) 7580!blk%=window% 7590blk%!4=icon% 7600SYS"Wimp_GetIconState",,blk% 7620ENDPROC 7650DEFPROCset_icon_state(window%,icon%) 7670!blk%=window% 7680blk%!4=icon% 7690SYS"Wimp_SetIconState",,blk% 7710ENDPROC 7740DEFPROCselect_icon(window%,icon%) 7760LOCALclear_word%,eor_word% 7770clear_word%=1<<21 7780eor_word%=1<<21 7790blk%!8=eor_word% 7800blk%!12=clear_word% 7810PROCset_icon_state(window%,icon%) 7830ENDPROC 7860DEFPROCshade_icon(window%,icon%) 7880LOCALclear_word%,eor_word% 7890clear_word%=1<<22 7900eor_word%=1<<22 7910blk%!8=eor_word% 7920blk%!12=clear_word% 7930PROCset_icon_state(window%,icon%) 7950ENDPROC 7980DEFPROCdeselect_icon(window%,icon%) 8000LOCALclear_word%,eor_word% 8010clear_word%=1<<21 8020eor_word%=0 8030blk%!8=eor_word% 8040blk%!12=clear_word% 8050PROCset_icon_state(window%,icon%) 8070ENDPROC 8100DEFPROCunshade_icon(window%,icon%) 8120LOCALclear_word%,eor_word% 8130clear_word%=1<<22 8140eor_word%=0 8150blk%!8=eor_word% 8160blk%!12=clear_word% 8170PROCset_icon_state(window%,icon%) 8190ENDPROC 8220DEFFNage(td%,tm%,ty%,bd%,bm%,by%) 8230LOCALy%,m% 8240y%=ty%-by% 8250m%=tm%-bm% 8260IFtd%<bd%m%-=1 8270IFm%<0 y%-=1:m%=m%+12 8280IFy%<0ORm%<0THEN="" 8290=STR$(y%)+"."+STR$(m%) 8320DEFPROCselect_test(test%,ch_icons%) 8340LOCALtd$,tm$,ty$,bd$,bm$,by$ 8360bd$=FNget_text(main_window%,dobd_icon%) 8370bm$=FNget_text(main_window%,dobm_icon%) 8380by$=FNget_text(main_window%,doby_icon%) 8400CASEtest%OF 8420WHEN1 8430IFch_icons%THEN 8440PROCselect_icon(main_window%,ra1_icon%) 8450PROCselect_icon(main_window%,tst1_icon%) 8460PROCdeselect_icon(main_window%,ra2_icon%) 8470PROCdeselect_icon(main_window%,tst2_icon%) 8480ENDIF 8500td$=FNget_text(main_window%,tst1d_icon%) 8510tm$=FNget_text(main_window%,tst1m_icon%) 8520ty$=FNget_text(main_window%,tst1y_icon%) 8540current_test%=1 8560WHEN2 8570IFch_icons%THEN 8580PROCselect_icon(main_window%,ra2_icon%) 8590PROCselect_icon(main_window%,tst2_icon%) 8600PROCdeselect_icon(main_window%,ra1_icon%) 8610PROCdeselect_icon(main_window%,tst1_icon%) 8620ENDIF 8640td$=FNget_text(main_window%,tst2d_icon%) 8650tm$=FNget_text(main_window%,tst2m_icon%) 8660ty$=FNget_text(main_window%,tst2y_icon%) 8680current_test%=2 8700ENDCASE 8720IFtd$=""ORtm$=""ORty$=""ORbd$=""ORbm$=""ORby$=""THEN 8730current_age$="--.--" 8740ELSE 8750current_age$=FNage(VAL(td$),VAL(tm$),VAL(ty$),VAL(bd$),VAL(bm$),VAL(by$)) 8760ENDIF 8780PROCput_text(main_window%,chage_icon%,current_age$) 8800ENDPROC 8830DEFPROCsave_record(record_no%) 8850IFFNchk_record(record_no%)THEN 8860name$(0,record_no%)=FNget_text(main_window%,name1_icon%) 8870name$(1,record_no%)=FNget_text(main_window%,name2_icon%) 8880dob%(0,record_no%)=VAL(FNget_text(main_window%,dobd_icon%)) 8890dob%(1,record_no%)=VAL(FNget_text(main_window%,dobm_icon%)) 8900dob%(2,record_no%)=VAL(FNget_text(main_window%,doby_icon%)) 8910ra%(0,0,record_no%)=VAL(FNget_text(main_window%,ra1y_icon%)) 8920ra%(0,1,record_no%)=VAL(FNget_text(main_window%,ra1m_icon%)) 8930ra%(1,0,record_no%)=VAL(FNget_text(main_window%,ra2y_icon%)) 8940ra%(1,1,record_no%)=VAL(FNget_text(main_window%,ra2m_icon%)) 8950ask_to_save%=TRUE 8960ENDIF 8980ENDPROC 9010DEFPROCload_record(record_no%) 9030PROCput_text(main_window%,record_icon%,STR$(record_no%+1)) 9050PROCput_text(main_window%,name1_icon%,name$(0,record_no%)) 9060PROCput_text(main_window%,name2_icon%,name$(1,record_no%)) 9070PROCput_text(main_window%,dobd_icon%,STR$(dob%(0,record_no%))) 9080PROCput_text(main_window%,dobm_icon%,STR$(dob%(1,record_no%))) 9090PROCput_text(main_window%,doby_icon%,STR$(dob%(2,record_no%))) 9100PROCput_text(main_window%,ra1y_icon%,STR$(ra%(0,0,record_no%))) 9110PROCput_text(main_window%,ra1m_icon%,STR$(ra%(0,1,record_no%))) 9120PROCput_text(main_window%,ra2y_icon%,STR$(ra%(1,0,record_no%))) 9130PROCput_text(main_window%,ra2m_icon%,STR$(ra%(1,1,record_no%))) 9150PROCselect_test(current_test%,FALSE) 9160PROCset_caret(main_window%,name1_icon%) 9180ENDPROC 9210DEFPROCforward 9230PROCsave_record(current_record%) 9250current_record%+=1 9260IFcurrent_record%>no_of_records%current_record%=0 9280PROCload_record(current_record%) 9300ENDPROC 9330DEFPROCbackward 9350PROCsave_record(current_record%) 9370current_record%-=1 9380IFcurrent_record%<0 current_record%=no_of_records% 9400PROCload_record(current_record%) 9420ENDPROC 9450DEFPROCsave_data(filename$) 9470LOCALhandle%,i%,j%,text$ 9480LOCALERROR 9500ONERRORLOCALPROCreport_error("Not found",TRUE,FALSE,false%):PROCreport_error("Bad file name: '"+filename$+"'",TRUE,FALSE,false%):ENDPROC 9520SYS"Hourglass_On" 9540PROCsave_record(current_record%) 9560handle%=OPENOUT(filename$) 9580PROCoutput(handle%,FNget_text(main_window%,gpname_icon%)) 9600text$=FNget_text(main_window%,tst1d_icon%)+","+FNget_text(main_window%,tst1m_icon%)+","+FNget_text(main_window%,tst1y_icon%) 9610IFVAL(FNget_text(main_window%,tst2d_icon%))<>0ANDVAL(FNget_text(main_window%,tst2m_icon%))<>0ANDVAL(FNget_text(main_window%,tst2y_icon%))<>0THEN 9620text$+=","+FNget_text(main_window%,tst2d_icon%)+","+FNget_text(main_window%,tst2m_icon%)+","+FNget_text(main_window%,tst2y_icon%) 9630ENDIF 9640PROCoutput(handle%,text$) 9660FORi%=0TOno_of_records% 9680text$=name$(0,i%)+","+name$(1,i%) 9690FORj%=0TO2 9700text$+=","+STR$(dob%(j%,i%)) 9710NEXT 9720FORj%=0TO1 9730text$+=","+STR$(ra%(0,j%,i%)) 9740NEXT 9750IFra%(1,0,i%)<>0ORra%(1,1,i%)<>0THEN 9760FORj%=0TO1 9770text$+=","+STR$(ra%(1,j%,i%)) 9780NEXT 9790ENDIF 9800PROCoutput(handle%,text$) 9820NEXT 9840CLOSE#handle% 9850OSCLI("*SetType "+filename$+" &DFE") 9870ask_to_save%=FALSE 9890SYS"Hourglass_Off" 9910ENDPROC 9940DEFPROCset_caret(window%,icon%) 9960PROCget_icon_state(window%,icon%) 9980SYS"Wimp_SetCaretPosition",window%,icon%,0,0,-1,LEN($blk%!28) 10000ENDPROC 10030DEFPROCsave_window_click(window%) 10050LOCALfilename$ 10070CASEmousebut%OF 10090WHENselect_click%,adjust_click% 10100IFicon_handle%=ok_icon%THEN 10110filename$=FNget_text(window%,filename_icon%) 10120IFINSTR(filename$,".")THEN 10130CASEwindow%OF 10140WHENsaveas1_window% 10150PROCsave_data(filename$) 10160WHENsaveas2_window% 10170PROCsave_draw(filename$) 10180WHENsaveas3_window% 10190PROCsave_text(filename$) 10200ENDCASE 10210PROCclose_menu 10220ELSE 10230PROCreport_error("To save, drag the icon to a directory display",TRUE,FALSE,false%) 10240ENDIF 10250ENDIF 10270WHENselect_drag%,adjust_drag% 10280IFicon_handle%=file_icon%THEN 10290drag_window%=window% 10300CASEwindow%OF 10310WHENsaveas1_window% 10320PROCdrag_start(drag_window%,file_icon%,"file_dfe") 10330WHENsaveas2_window% 10340PROCdrag_start(drag_window%,file_icon%,"file_aff") 10350WHENsaveas3_window% 10360PROCdrag_start(drag_window%,file_icon%,"file_fff") 10370ENDCASE 10380ENDIF 10390ENDCASE 10400ENDPROC 10430DEFPROCreport_error(text$,ok%,cancel%,RETURNclick%) 10450SYS"Hourglass_Smash" 10460LOCALflag% 10470flag%=0 10480flag%=flag%OR1<<4 10490IFok%flag%=flag%OR1<<0 10500IFcancel%flag%=flag%OR1<<1 10510text$=CHR$(0)+CHR$(0)+CHR$(0)+CHR$(0)+text$+CHR$(0) 10520IFclick%THEN 10530SYS"Wimp_ReportError",text$,flag%,app_name$TO,click% 10540ELSE 10550SYS"Wimp_ReportError",text$,flag%,app_name$ 10560ENDIF 10580ENDPROC 10610DEFPROCdrag_init 10630LOCALcmos 10640drag_start%=FNswi("DragASprite_Start") 10650drag_stop%=FNswi("DragASprite_Stop") 10660SYS"OS_Byte",161,28TO,,cmos 10670IF(cmosAND 2)=0 drag_start%=-1:drag_stop%=-1 10690ENDPROC 10720DEFFNswi(swi$) 10730LOCALswi 10740SYS"XOS_SWINumberFromString",,swi$TOswi;flag 10750IF(flagAND 1)swi=-1 10760=swi 10790DEFPROCdrag_start(window%,icon%,drag_file_type$) 10810LOCALx%,y% 10830!blk%=window% 10840SYS"Wimp_GetWindowState",,blk% 10850x%=blk%!4-blk%!20 10860y%=blk%!16-blk%!24 10880blk%!4=icon% 10890SYS"Wimp_GetIconState",,blk% 10910blk%!4=5 10920blk%!8+=x% 10930blk%!12+=y% 10940blk%!16+=x% 10950blk%!20+=y% 10960blk%!24=-1 10970blk%!28=-1 10980blk%!32=&7FFFFFFF 10990blk%!36=&7FFFFFFF 11010IFdrag_start%=-1THEN 11020SYS"Wimp_DragBox",,blk% 11030ELSE 11040SYSdrag_start%,%11000101,1,drag_file_type$,blk%+8,blk%+24 11050ENDIF 11060ENDPROC 11090DEFPROCdrag_over 11110LOCALwindow%,icon%,x%,y%,file$,size% 11130size%=0 11150IFdrag_stop%<>-1SYSdrag_stop% 11160SYS"Wimp_GetPointerInfo",,blk% 11170x%=blk%!0 11180y%=blk%!4 11190window%=blk%!12 11200icon%=blk%!16 11220IFwindow%<>saveas1_window%AND window%<>saveas2_window%AND window%<>saveas3_window%AND window%<>main_window%THEN 11230file$=FNleaf(FNget_text(drag_window%,filename_icon%)) 11240blk%!0=256:blk%!12=0:blk%!16=1:blk%!20=window%:blk%!24=icon%:blk%!28=x%:blk%!32=y%:blk%!36=size%:$(blk%+44)=file$+CHR$(0) 11250CASEdrag_window%OF 11260WHENsaveas1_window% 11270blk%!40=&DFE 11280WHENsaveas2_window% 11290blk%!40=&AFF 11300WHENsaveas3_window% 11310blk%!40=&FFF 11320ENDCASE 11330SYS"Wimp_SendMessage",17,blk%,window%,icon%TOdest_task% 11340ENDIF 11360ENDPROC 11390DEFFNleaf(path$) 11410WHILEINSTR(path$,".") 11420path$=MID$(path$,INSTR(path$,".",i%)+1) 11430ENDWHILE 11450=path$ 11480DEFFNpath(path$) 11500LOCALi% 11520WHILEINSTR(path$,".",i%) 11530i%=INSTR(path$,".",i%)+1 11540ENDWHILE 11560IFi%=0 i%=LEN(path$)+1 11570=LEFT$(path$,i%-1) 11600DEFPROCkey_press 11620LOCALwindow%,icon%,key%,file_name$,file_type$ 11640window%=!blk% 11650icon%=blk%!4 11660key%=blk%!24 11680IFkey%=27PROCclose_menu 11700CASEkey%OF 11710WHEN387 11720PROCopen_save_window(main_window%,saveas1_window%) 11730PROCset_caret(saveas1_window%,filename_icon%) 11740WHEN388 11750PROCopen_save_window(main_window%,goto_window%) 11760IFFNselected(goto_window%,record_rad_icon%)PROCset_caret(goto_window%,record_wri_icon%)ELSEPROCset_caret(goto_window%,name_wri_icon%) 11770WHEN389 11780PROCopen_save_window(main_window%,sort_window%) 11790WHEN403 11800PROCopen_save_window(main_window%,saveas2_window%) 11810PROCset_caret(saveas2_window%,filename_icon%) 11820WHEN419 11830PROCopen_save_window(main_window%,saveas3_window%) 11840PROCset_caret(saveas3_window%,filename_icon%) 11850ENDCASE 11870CASEwindow%OF 11880WHENsaveas1_window%,saveas2_window%,saveas3_window% 11890PROCsave_key_press(window%,key%,icon%) 11900WHENmain_window% 11910CASEkey%OF 11920WHEN13 11930IFicon%=ra2m_icon%THEN 11940IFcurrent_record%=no_of_records%THEN 11950no_of_records%+=1 11960PROCput_text(main_window%,noingp_icon%,STR$(no_of_records%+1)) 11970ENDIF 11980PROCforward 11990ENDIF 12000OTHERWISE 12010SYS"Wimp_ProcessKey",key% 12020ENDCASE 12030WHENgoto_window% 12040IFkey%=13THEN 12050PROCclose_menu 12060PROCgoto 12070ENDIF 12080OTHERWISE 12090SYS"Wimp_ProcessKey",key% 12100ENDCASE 12120ENDPROC 12150DEFPROCsave_key_press(window%,key%,icon%) 12170LOCALfile$,type% 12190CASEkey%OF 12210WHEN13 12220file$=FNget_text(window%,icon%) 12230IFINSTR(file$,".")THEN 12240CASEwindow%OF 12250WHENsaveas1_window% 12260PROCsave_data(file$) 12270PROCclose_menu 12280WHENsaveas2_window% 12290PROCsave_draw(file$) 12300PROCclose_menu 12310WHENsaveas3_window% 12320PROCsave_text(file$) 12330PROCclose_menu 12340ENDCASE 12350ELSE 12360PROCreport_error("To save, drag the icon to a directory display",TRUE,FALSE,false%) 12370ENDIF 12380OTHERWISE 12390SYS"Wimp_ProcessKey",key% 12400ENDCASE 12420ENDPROC 12450DEFPROCclose_menu 12460SYS"Wimp_CreateMenu",,-1 12470ENDPROC 12500DEFPROCsave_request 12520IFblk%!40=&DFETHEN 12530IFFNsys_var("Wimp$Scrap")<>""THEN 12540blk%!36=-1 12550$(blk%+44)="<Wimp$Scrap>"+CHR$(0) 12560blk%!0=64 12570blk%!12=blk%!8:blk%!16=2:SYS"Wimp_SendMessage",17,blk%,blk%!4 12580ELSE 12590PROCreport_error("Wimp$Scrap not found.",TRUE,FALSE,false%) 12600PROCreport_error(app_name$+" needs to have 'seen' !Scrap.",TRUE,FALSE,false%) 12610ENDIF 12620ENDIF 12640ENDPROC 12670DEFPROCload_request 12690LOCALhandle%,i%,eol%,file$,click% 12710IFblk%!40=&DFETHEN 12730IFFNask2saveTHEN 12740click%=TRUE 12750PROCreport_error("Loading will wipe current UNsaved data...",TRUE,TRUE,click%) 12760ELSE 12770click%=1 12780ENDIF 12800IFclick%<>1ENDPROC 12820SYS"Hourglass_On" 12830PROCwipe_all(FALSE) 12850file$=FNget_string(blk%+44,255) 12860handle%=OPENIN(file$) 12880group$=FNget_cell(handle%,eol%) 12900eol%=0 12920FORi%=0TO1 12930FORj%=0TO2 12940IFeol%=0 test%(j%,i%)=VAL(FNget_cell(handle%,eol%)) 12950NEXT 12960NEXT 12980FORi%=0TOmax_no_of_records% 13000eol%=0 13010name$(0,i%)=FNget_cell(handle%,eol%) 13020name$(1,i%)=FNget_cell(handle%,eol%) 13030FORj%=0TO2 13040dob%(j%,i%)=VAL(FNget_cell(handle%,eol%)) 13050NEXT 13060ra%(0,0,i%)=VAL(FNget_cell(handle%,eol%)):ra%(0,1,i%)=VAL(FNget_cell(handle%,eol%)) 13070IFeol%=0 ra%(1,0,i%)=VAL(FNget_cell(handle%,eol%)):ra%(1,1,i%)=VAL(FNget_cell(handle%,eol%)) 13080IFeol%=2 no_of_records%=i%:i%=max_no_of_records% 13100NEXT 13120CLOSE#handle% 13140IFfile$="<Wimp$Scrap>"OSCLI("*DELETE ""<Wimp$Scrap>""")ELSEPROCput_text(saveas1_window%,filename_icon%,file$) 13150PROCput_text(saveas2_window%,filename_icon%,"RA�Graph") 13160PROCput_text(saveas3_window%,filename_icon%,"RA�Text") 13180blk%!12=blk%!8 13190blk%!16=4 13200SYS"Wimp_SendMessage",17,blk%,blk%!4 13220PROCopen_window(main_window%) 13230PROCput_text(main_window%,gpname_icon%,group$) 13240PROCput_text(main_window%,noingp_icon%,STR$(no_of_records%+1)) 13250current_record%=0 13260PROCload_record(current_record%) 13270PROCput_text(main_window%,tst1d_icon%,STR$(test%(0,0))) 13280PROCput_text(main_window%,tst1m_icon%,STR$(test%(1,0))) 13290PROCput_text(main_window%,tst1y_icon%,STR$(test%(2,0))) 13300PROCput_text(main_window%,tst2d_icon%,STR$(test%(0,1))) 13310PROCput_text(main_window%,tst2m_icon%,STR$(test%(1,1))) 13320PROCput_text(main_window%,tst2y_icon%,STR$(test%(2,1))) 13340SYS"Hourglass_Off" 13360ENDIF 13380ENDPROC 13410DEFFNget_string(ptr%,length%) 13430LOCALtemp$ 13450IFlength%=0 length%=255 13460FORptr%=ptr%TOptr%+length%-1 13470IF?ptr%<32THEN 13480=temp$ 13490ELSE 13500temp$+=CHR$(?ptr%) 13510ENDIF 13520NEXT 13530=temp$ 13560DEFPROCsave_demand 13580LOCALfile$,type% 13600file$=FNget_string(blk%+44,255) 13610IFblk%!36=-1THENto_filer%=FALSEELSEto_filer%=TRUE 13620type%=blk%!40 13640CASEdrag_window%OF 13650WHENsaveas1_window% 13660PROCsave_data(file$) 13670blk%!12=blk%!8:blk%!16=3:SYS"Wimp_SendMessage",17,blk%,blk%!4 13680IFto_filer%PROCput_text(saveas1_window%,filename_icon%,file$) 13690WHENsaveas2_window% 13700PROCsave_draw(file$) 13710blk%!12=blk%!8:blk%!16=3:SYS"Wimp_SendMessage",17,blk%,blk%!4 13720IFto_filer%PROCput_text(saveas2_window%,filename_icon%,file$) 13730WHENsaveas3_window% 13740PROCsave_text(file$) 13750blk%!12=blk%!8:blk%!16=3:SYS"Wimp_SendMessage",17,blk%,blk%!4 13760IFto_filer%PROCput_text(saveas3_window%,filename_icon%,file$) 13770ENDCASE 13780ENDPROC 13810DEFFNget_cell(handle%,RETURNeol%) 13820LOCALtemp$,temp%,cell$ 13830IFEOF#handle%eol%=2 13840WHILEeol%<>2AND temp%<>44AND temp%<>10AND temp%<>13ANDLEN(cell$)<255 13850IFtemp%<>0 temp$=CHR$(temp%) 13860IFtemp$=""""temp$="" 13870cell$+=temp$ 13880temp%=BGET#handle% 13890IFtemp%=10ORtemp%=13 eol%=1 13900IFEOF#handle%THEN 13910eol%=2 13920IFtemp%<>0 temp$=CHR$(temp%) 13930IFtemp$=""""temp$="" 13940cell$+=temp$ 13950ENDIF 13960ENDWHILE 13970=cell$ 14000DEFPROCoutput(handle%,line$) 14030LOCALi% 14050IFline$=""BPUT#handle%,10:ENDPROC 14070FORi%=1TOLEN(line$) 14090BPUT#handle%,ASC(MID$(line$,i%,1)) 14110NEXT 14130BPUT#handle%,10 14150ENDPROC 14180DEFPROCsave_draw(file$) 14200LOCALerror%,click%,i%,append% 14220IFno_of_records%>30THEN 14230click%=TRUE 14240PROCreport_error("The graph will be more than 1 page long. Is it OK to name the files '"+LEFT$(FNleaf(file$),9)+"0', '"+LEFT$(FNleaf(file$),9)+"1' etc.",TRUE,TRUE,click%) 14250IFclick%<>1ENDPROC 14260append%=TRUE 14270ELSE 14280append%=FALSE 14290ENDIF 14310SYS"Hourglass_On" 14320group$=FNget_text(main_window%,gpname_icon%) 14330PROCsave_record(current_record%) 14340test%(0,0)=VAL(FNget_text(main_window%,tst1d_icon%)) 14350test%(1,0)=VAL(FNget_text(main_window%,tst1m_icon%)) 14360test%(2,0)=VAL(FNget_text(main_window%,tst1y_icon%)) 14370test%(0,1)=VAL(FNget_text(main_window%,tst2d_icon%)) 14380test%(1,1)=VAL(FNget_text(main_window%,tst2m_icon%)) 14390test%(2,1)=VAL(FNget_text(main_window%,tst2y_icon%)) 14400FORi%=0TOno_of_records%DIV31 14410IFappend%THEN 14420PROCdrawfile_start(FNpath(file$)+LEFT$(FNleaf(file$),9)+STR$(i%),error%) 14430ELSE 14440PROCdrawfile_start(file$,error%) 14450ENDIF 14460IFerror%THENENDPROC 14470PROCfonttable 14480PROCgrid 14490PROCfill(i%*31) 14500PROCdrawfile_end 14510IFappend%THEN 14520OSCLI("SetType "+FNpath(file$)+LEFT$(FNleaf(file$),9)+STR$(i%)+" AFF") 14530ELSE 14540OSCLI("SetType "+drawfile$+" AFF") 14550ENDIF 14560NEXT 14570SYS"Hourglass_Off" 14590ENDPROC 14620DEFPROCgrid 14640LOCALi%,h%,w%,a$ 14660PROCgroup_start 14680FORi%=0TO31 14690h%=2.75*cm+i%*.75*cm 14700PROCpath_start(1*cm,h%,1*point,black%,none%) 14710PROCpath_draw(20.25*cm,h%) 14720PROCpath_end 14730NEXT 14750FORi%=0TO6 14760h%=8.25*cm+i%*2*cm 14770PROCpath_start(h%,26*cm,1*point,black%,none%) 14780PROCpath_draw(h%,26.5*cm) 14790PROCpath_end 14800NEXT 14820FORi%=0TO5 14830h%=9.25*cm+i%*2*cm 14840PROCpath_start(h%,26*cm,1*point,black%,none%) 14850PROCpath_draw(h%,26.25*cm) 14860PROCpath_end 14870NEXT 14890PROCdown_line(1*cm,1*point) 14900PROCdown_line(4.5*cm,1*point) 14910PROCdown_line(6*cm,1*point) 14920PROCdown_line(7*cm,1*point) 14930PROCdown_line(8*cm,1*point) 14940PROCdown_line(8.25*cm,.25*point) 14950PROCdown_line(10.25*cm,.25*point) 14960PROCdown_line(12.25*cm,.25*point) 14970PROCdown_line(16.25*cm,.25*point) 14980PROCdown_line(18.25*cm,.25*point) 14990PROCdown_line(20.25*cm,1*point) 15010FORi%=0TO6 15020h%=8.15*cm+i%*2*cm 15030PROCtext(h%,26.75*cm,STR$(i%-3),12*point,12*point,1,black%,none%) 15040NEXT 15060PROCtext(2.25*cm,26.5*cm,"Name D.O.B. R.A.1 R.A.2",11*point,11*point,1,black%,none%) 15090ENDPROC 15120DEFPROCdown_line(x%,thick%) 15130PROCpath_start(x%,26*cm,thick%,black%,none%) 15140PROCpath_draw(x%,2.75*cm) 15150PROCpath_end 15160ENDPROC 15190DEFPROCinit_draw 15200maxlev%=32 15210DIMstart%(maxlev%),box%(maxlev%) 15220DIMl%(maxlev%),b%(maxlev%),r%(maxlev%),t%(maxlev%) 15230DIMbuf%256 15240no_of_d_fonts%=2 15250DIMd_font$(no_of_d_fonts%) 15260d_font$(1)="Trinity.Medium" 15270d_font$(2)="Trinity.Bold" 15280big%=&7FFFFFFF 15290EF=0.552256944 15300c%=0 15310inch=&B400 15320point=640 15330cm=18140 15340mm=1814 15350black%=0 15360white%=&FFFFFF00 15370red%=FNcol(255,0,0) 15380DIMbar_col%(1) 15390DIMkey%(1) 15400bar_col%(0)=FNcol(119,119,119) 15410bar_col%(1)=FNcol(221,221,221) 15420none%=-1 15430ENDPROC 15450DEFPROCdrawfile_start(D$,RETURNerror%) 15470LOCALERROR 15490ONERRORLOCALPROCreport_error("Not found",TRUE,FALSE,false%):PROCreport_error("Bad file name: '"+D$+"'",TRUE,FALSE,false%):error%=TRUE:ENDPROC 15510c%=OPENOUT(D$) 15520drawfile$=D$ 15530PROCputw(&77617244):PROCputw(201):PROCputw(0) 15540PROCputs12("!ReadAge") 15550lev%=-1 15560PROChead_here(TRUE) 15570ENDPROC 15590DEFPROCdrawfile_end 15600IFlev%>0THENPRINT"Warning: Draw file closed with object(s) unfinished " 15610PROChead_now 15620CLOSE#c%:c%=0 15630ENDPROC 15650DEFPROCpath_start(x%,y%,width%,lcol%,fcol%) 15660PROCputw(2) 15670PROChead_here(TRUE) 15680PROCputw(fcol%) 15690PROCputw(lcol%) 15700PROCputw(width%) 15710PROCputw(0) 15720PROCpath_move(x%,y%) 15730ENDPROC 15750DEFPROCrectangle(x%,y%,xl%,yl%,width%,lcol%,fcol%) 15760PROCpath_start(x%,(y%-yl%)/2,width%,lcol%,fcol%) 15770PROCpath_move(x%,y%) 15780PROCpath_draw(x%+xl%,y%) 15790PROCpath_draw(x%+xl%,y%+yl%) 15800PROCpath_draw(x%,y%+yl%) 15820PROCpath_close 15830PROCpath_end 15840ENDPROC 15860DEFPROCpath_move(x%,y%) 15870PROCputw(2) 15880PROCputxy(x%,y%) 15890ENDPROC 15910DEFPROCpath_draw(x%,y%) 15920PROCputw(8) 15930PROCputxy(x%,y%) 15940ENDPROC 15960DEFPROCpath_bezier(xc1%,yc1%,xc2%,yc2%,x%,y%) 15970PROCputw(6) 15980PROCputxy(xc1%,yc1%) 15990PROCputxy(xc2%,yc2%) 16000PROCputxy(x%,y%) 16010ENDPROC 16030DEFPROCpath_close 16040PROCputw(5) 16050ENDPROC 16070DEFPROCpath_end 16080PROCputw(0) 16090PROChead_now 16100ENDPROC 16120DEFPROCellipse(x%,y%,w%,h%,width%,lcol%,fcol%) 16130PROCpath_start(x%,y%-h%,width%,lcol%,fcol%) 16140PROCpath_bezier(x%+w%*EF,y%-h%,x%+w%,y%-h%*EF,x%+w%,y%) 16150PROCpath_bezier(x%+w%,y%+h%*EF,x%+w%*EF,y%+h%,x%,y%+h%) 16160PROCpath_bezier(x%-w%*EF,y%+h%,x%-w%,y%+h%*EF,x%-w%,y%) 16170PROCpath_bezier(x%-w%,y%-h%*EF,x%-w%*EF,y%-h%,x%,y%-h%) 16180PROCpath_close 16190PROCpath_end 16200ENDPROC 16220DEFPROCgroup_start 16240PROCputw(6) 16250PROChead_here(TRUE) 16260PROCputs12("group") 16270ENDPROC 16290DEFPROCgroup_end 16300PROChead_now 16310ENDPROC 16330DEFPROCfonttable 16340LOCALi% 16350PROCputw(0) 16360PROChead_here(FALSE) 16370FORi%=1TOno_of_d_fonts% 16380PROCputs(CHR$(i%)+d_font$(i%)) 16390NEXT 16400PROCalign 16410PROChead_now 16420ENDPROC 16440DEFPROCtext(x%,y%,text$,xsize%,ysize%,font%,col%,bcol%) 16450PROCputw(1) 16460PROChead_here(FALSE) 16470PROCputxy(x%,y%-ysize%*.5) 16480PROCputxy(x%+LEN(text$)*xsize%,y%+ysize%) 16490PROCputw(col%) 16500PROCputw(bcol%) 16510PROCputw(font%) 16520PROCputw(xsize%):PROCputw(ysize%) 16530PROCputxy(x%,y%) 16540PROCputs(text$):PROCalign 16550PROChead_now 16560ENDPROC 16580DEFFNcol(R%,G%,B%) 16590=(R%<<8)+(G%<<16)+(B%<<24) 16610DEFPROCputw(A%) 16620BPUT#c%,A%AND&FF 16630BPUT#c%,(A%>>>8)AND&FF 16640BPUT#c%,(A%>>>16)AND&FF 16650BPUT#c%,(A%>>>24)AND&FF 16660ENDPROC 16680DEFPROCputs12(A$) 16690LOCALA% 16700A$=A$+STRING$(12," ") 16710FORA%=1TO12:BPUT#c%,ASC(MID$(A$,A%,1)):NEXT 16720ENDPROC 16740DEFPROCputs(A$) 16750LOCALA% 16760FORA%=1TOLEN(A$):BPUT#c%,ASC(MID$(A$,A%,1)):NEXT 16770BPUT#c%,0 16780ENDPROC 16800DEFPROChead_here(box%) 16810IFlev%=maxlev%THENERROR1234,"Too many nested groups. Edit program t o increase limit." 16820lev%+=1 16830box%(lev%)=box% 16840start%(lev%)=PTR#c% 16850IFlev%>0THENPROCputw(0) 16860IFbox%THEN 16870PROCputw(0):PROCputw(0) 16880PROCputw(0):PROCputw(0) 16890ENDIF 16900l%(lev%)=big%:b%(lev%)=big% 16910r%(lev%)=-big%:t%(lev%)=-big% 16920ENDPROC 16940DEFPROChead_now 16950LOCALend% 16960IFlev%<0THENPRINT"Warning: attempt to end more objects than were star ted":ENDPROC 16970end%=PTR#c% 16980PTR#c%=start%(lev%) 16990IFlev%>0THENPROCputw(end%-start%(lev%)+4) 17000IFbox%(lev%)THEN 17010PROCputw(l%(lev%)):PROCputw(b%(lev%)) 17020PROCputw(r%(lev%)+1):PROCputw(t%(lev%)+1) 17030ENDIF 17040IFlev%>0THEN 17050lev%-=1 17060IFl%(lev%+1)<l%(lev%)THENl%(lev%)=l%(lev%+1) 17070IFb%(lev%+1)<b%(lev%)THENb%(lev%)=b%(lev%+1) 17080IFr%(lev%+1)>r%(lev%)THENr%(lev%)=r%(lev%+1) 17090IFt%(lev%+1)>t%(lev%)THENt%(lev%)=t%(lev%+1) 17100ENDIF 17110PTR#c%=end% 17120ENDPROC 17140DEFPROCputxy(x%,y%) 17150PROCputw(x%):PROCputw(y%) 17160IFx%<l%(lev%)THENl%(lev%)=x% 17170IFy%<b%(lev%)THENb%(lev%)=y% 17180IFx%>r%(lev%)THENr%(lev%)=x% 17190IFy%>t%(lev%)THENt%(lev%)=y% 17200ENDPROC 17220DEFPROCalign 17230WHILEPTR#c%AND 3:BPUT#c%,0:ENDWHILE 17240ENDPROC 17260DEFFNword 17270=BGET#i%OR(&100*BGET#i%)OR(&10000*BGET#i%)OR((BGET#i%)<<24) 17300DEFFNlength_of_bar(test%,record%) 17320LOCALdiff 17340diff=FNage_diff(record%,test%) 17350IFABS(diff)>3=SGN(diff)*6*cmELSE=2*cm*diff 17380DEFFNage_diff(record%,test%) 17400LOCALray%,ram%,agey%,agem% 17420ray%=ra%(test%,0,record%) 17430ram%=ra%(test%,1,record%) 17440PROCage_ym(test%(0,test%),test%(1,test%),test%(2,test%),dob%(0,record%),dob%(1,record%),dob%(2,record%),agey%,agem%) 17450=(ray%+ram%/12)-(agey%+agem%/12) 17480DEFPROCmonthyear(age$,RETURNy%,RETURNm%) 17500LOCALy$,m$,i%,point%,len% 17520point%=INSTR(age$,".") 17530len%=LEN(age$) 17550IFpoint%=0 point%=len%+1 17560IFpoint%<>1THEN 17570FORi%=1TOpoint%-1 17580y$+=MID$(age$,i%,1) 17590NEXT 17600ENDIF 17620IFpoint%<>len%+1THEN 17630FORi%=point%+1TOlen% 17640m$+=MID$(age$,i%,1) 17650NEXT 17660ENDIF 17680PRINTy$,m$ 17690y%=VAL(y$):m%=VAL(m$) 17710ENDPROC 17740DEFPROCfill(offset%) 17760LOCALi%,j% 17780FORi%=0TO30 17800IFname$(0,(i%+offset%))<>""PROCtext(1.1*cm,25.5*cm-.75*i%*cm,name$(0,(i%+offset%)),8*point,10*point,1,black%,none%) 17810IFname$(1,(i%+offset%))<>""PROCtext(3.1*cm,25.5*cm-.75*i%*cm,name$(1,(i%+offset%)),8*point,10*point,1,black%,none%) 17820IFdob%(0,(i%+offset%))<>0ORdob%(1,(i%+offset%))<>0ORdob%(2,(i%+offset%))<>0THENPROCtext(4.6*cm,25.5*cm-.75*i%*cm,STR$(dob%(0,(i%+offset%)))+"/"+STR$(dob%(1,(i%+offset%)))+"/"+STR$(dob%(2,(i%+offset%))),10*point,10*point,1,black%,none%) 17840FORj%=0TO1 17850IFra%(j%,0,(i%+offset%))<>0ORra%(j%,1,(i%+offset%))<>0THEN 17860PROCtext((6.1+j%)*cm,25.5*cm-.75*i%*cm,STR$(ra%(j%,0,(i%+offset%)))+"."+STR$(ra%(j%,1,(i%+offset%))),10*point,10*point,1,black%,none%) 17870key%(j%)=TRUE 17880PROCpath_start(14.25*cm,25.625*cm-.75*i%*cm-.25*cm*j%,1*point,black%,bar_col%(j%)) 17890PROCpath_draw(14.25*cm+FNlength_of_bar(j%,(i%+offset%)),25.625*cm-.75*i%*cm-.25*cm*j%) 17900PROCpath_draw(14.25*cm+FNlength_of_bar(j%,(i%+offset%)),25.875*cm-.75*i%*cm-.25*cm*j%) 17910PROCpath_draw(14.25*cm,25.875*cm-.75*i%*cm-.25*cm*j%) 17920PROCpath_end 17930ENDIF 17940NEXT 17960NEXT 17980PROCdown_line(14.25*cm,2*point) 18000PROCgroup_end 18020PROCtext(4.75*cm,28.5*cm,"Graph of Reading Age minus Chronological Age for: "+group$,12*point,12*point,2,black%,none%) 18040PROCgroup_start 18060FORj%=0TO1 18070IFkey%(j%)THEN 18080PROCtext((2.25+j%*3.75)*cm,27.25*cm,"Test "+STR$(j%+1)+": "+STR$(test%(0,j%))+"/"+STR$(test%(1,j%))+"/"+STR$(test%(2,j%)),12*point,12*point,2,black%,none%) 18090PROCrectangle((5.25+j%*3.75)*cm,27.15*cm,.5*cm,.5*cm,1*point,black%,bar_col%(j%)) 18100ENDIF 18110NEXT 18130PROCgroup_end 18150ENDPROC 18180DEFPROCage_ym(td%,tm%,ty%,bd%,bm%,by%,RETURNy%,RETURNm%) 18190y%=ty%-by% 18200m%=tm%-bm% 18210IFtd%<bd%m%-=1 18220IFm%<0 y%-=1:m%=m%+12 18230ENDPROC 18260DEFPROCopen_save_window(main_w%,save_w%) 18280LOCALxm%,ym%,l%,w%,x_offset%,y_offset% 18290x_offset%=300 18300y_offset%=625 18320!temp_blk%=main_w% 18330SYS"Wimp_GetWindowState",,temp_blk% 18340x%=temp_blk%!4 18350y%=temp_blk%!8 18360SYS"Wimp_CreateMenu",,save_w%,x%+x_offset%,y%+y_offset% 18370ENDPROC 18400DEFPROCwipe_all(r%) 18420LOCALi%,j%,k% 18440name$()="" 18450dob%()=0 18460ra%()=0 18470test%()=0 18480group$="" 18500IFr%PROCwipe_record 18510ask_to_save%=FALSE 18520no_of_records%=0 18530current_record%=0 18540PROCput_text(main_window%,noingp_icon%,"1") 18550PROCput_text(main_window%,record_icon%,"1") 18560PROCput_text(saveas1_window%,filename_icon%,"RA�Data") 18570PROCput_text(saveas2_window%,filename_icon%,"RA�Graph") 18580PROCput_text(saveas3_window%,filename_icon%,"RA�Text") 18600ENDPROC 18630DEFPROCwipe_record 18650PROCput_text(main_window%,gpname_icon%,"") 18660PROCput_text(main_window%,name1_icon%,"") 18670PROCput_text(main_window%,name2_icon%,"") 18680PROCput_text(main_window%,dobd_icon%,"") 18690PROCput_text(main_window%,dobm_icon%,"") 18700PROCput_text(main_window%,doby_icon%,"") 18710PROCput_text(main_window%,ra1y_icon%,"") 18720PROCput_text(main_window%,ra1m_icon%,"") 18730PROCput_text(main_window%,ra2y_icon%,"") 18740PROCput_text(main_window%,ra2m_icon%,"") 18750PROCput_text(main_window%,tst1d_icon%,"") 18760PROCput_text(main_window%,tst1m_icon%,"") 18770PROCput_text(main_window%,tst1y_icon%,"") 18780PROCput_text(main_window%,tst2d_icon%,"") 18790PROCput_text(main_window%,tst2m_icon%,"") 18800PROCput_text(main_window%,tst2y_icon%,"") 18810PROCset_caret(main_window%,name1_icon%) 18830ENDPROC 18860DEFFNask2save 18880IFask_to_save%THEN 18890=TRUE 18900ELSE 18910IFFNchk_record(current_record%)THEN=TRUE 18920ENDIF 18940=FALSE 18970DEFFNchk_record(current_record%) 18990IFname$(0,current_record%)<>FNget_text(main_window%,name1_icon%)=TRUE 19000IFname$(1,current_record%)<>FNget_text(main_window%,name2_icon%)=TRUE 19010IFdob%(0,current_record%)<>VAL(FNget_text(main_window%,dobd_icon%))=TRUE 19020IFdob%(1,current_record%)<>VAL(FNget_text(main_window%,dobm_icon%))=TRUE 19030IFdob%(2,current_record%)<>VAL(FNget_text(main_window%,doby_icon%))=TRUE 19040IFra%(0,0,current_record%)<>VAL(FNget_text(main_window%,ra1y_icon%))=TRUE 19050IFra%(0,1,current_record%)<>VAL(FNget_text(main_window%,ra1m_icon%))=TRUE 19060IFra%(1,0,current_record%)<>VAL(FNget_text(main_window%,ra2y_icon%))=TRUE 19070IFra%(1,1,current_record%)<>VAL(FNget_text(main_window%,ra2m_icon%))=TRUE 19080IFgroup$<>FNget_text(main_window%,gpname_icon%)=TRUE 19090IFtest%(0,0)<>VAL(FNget_text(main_window%,tst1d_icon%))=TRUE 19100IFtest%(1,0)<>VAL(FNget_text(main_window%,tst1m_icon%))=TRUE 19110IFtest%(2,0)<>VAL(FNget_text(main_window%,tst1y_icon%))=TRUE 19120IFtest%(0,1)<>VAL(FNget_text(main_window%,tst2d_icon%))=TRUE 19130IFtest%(1,1)<>VAL(FNget_text(main_window%,tst2m_icon%))=TRUE 19140IFtest%(2,1)<>VAL(FNget_text(main_window%,tst2y_icon%))=TRUE 19160=FALSE 19190DEFPROCchk_wipe 19210LOCALclick%,text$ 19230click%=TRUE 19240text$="Are you sure you want to wipe ALL the data" 19250IFFNask2save text$+=", the current data is UNsaved?"ELSEtext$+="?" 19260PROCreport_error(text$,TRUE,TRUE,click%) 19270IFclick%=1PROCwipe_all(TRUE) 19290ENDPROC 19320DEFPROCcheck 19340IFFNask2saveTHEN 19350SYS"Wimp_CreateMenu",,message_window%,300,700 19360VDU7 19370quit%=FALSE 19380ELSE 19390sure%=TRUE 19400ENDIF 19420ENDPROC 19450DEFPROCsave_text(filename$) 19470LOCALhandle%,i%,j%,text$,temp$,m% 19520SYS"Hourglass_On" 19540PROCsave_record(current_record%) 19560handle%=OPENOUT(filename$) 19580PROCoutput(handle%,FNget_text(main_window%,gpname_icon%)) 19600text$="Test 1: "+FNget_text(main_window%,tst1d_icon%)+"/"+FNget_text(main_window%,tst1m_icon%)+"/"+FNget_text(main_window%,tst1y_icon%) 19620IFVAL(FNget_text(main_window%,tst2d_icon%))<>0ANDVAL(FNget_text(main_window%,tst2m_icon%))<>0ANDVAL(FNget_text(main_window%,tst2y_icon%))<>0THEN 19630text$+=" Test 2: "+FNget_text(main_window%,tst2d_icon%)+"/"+FNget_text(main_window%,tst2m_icon%)+"/"+FNget_text(main_window%,tst2y_icon%) 19640ENDIF 19660IFFNselected(saveas3_window%,aget_opt_icon%)THEN 19670PROCtodays_date(d%,m%,y%) 19680text$+=" Today: "+STR$(d%)+"/"+STR$(m%)+"/"+STR$(y%) 19690ENDIF 19710PROCoutput(handle%,text$) 19720PROCoutput(handle%,"") 19740text$="" 19750IFFNselected(saveas3_window%,name_opt_icon%)text$+=FNpad("Name:",33) 19760IFFNselected(saveas3_window%,dob_opt_icon%)text$+=FNpad("D.O.B:",10) 19770IFFNselected(saveas3_window%,ra1_opt_icon%)text$+=FNpad("R.A.1:",7) 19780IFFNselected(saveas3_window%,age1_opt_icon%)text$+=FNpad("Age 1:",7) 19790IFFNselected(saveas3_window%,ra2_opt_icon%)text$+=FNpad("R.A.2:",7) 19800IFFNselected(saveas3_window%,age2_opt_icon%)text$+=FNpad("Age 2:",7) 19810IFFNselected(saveas3_window%,aget_opt_icon%)text$+=FNpad("Today:",6) 19840PROCoutput(handle%,text$) 19850PROCoutput(handle%,"") 19870FORi%=0TOno_of_records% 19890text$="" 19900IFFNselected(saveas3_window%,name_opt_icon%)THEN 19910text$+=FNpad(name$(0,i%),18) 19920text$+=FNpad(name$(1,i%),15) 19930ENDIF 19950IFFNselected(saveas3_window%,dob_opt_icon%)THEN 19960temp$="" 19970FORj%=0TO2 19980temp$+=STR$(dob%(j%,i%)) 19990IFj%<2 temp$+="/" 20000NEXT 20010IFtemp$="0/0/0"temp$="" 20020text$+=FNpad(temp$,10) 20030ENDIF 20050IFFNselected(saveas3_window%,ra1_opt_icon%)THEN 20060temp$="" 20070IFra%(0,0,i%)<>0ORra%(0,1,i%)<>0THEN 20080FORj%=0TO1 20090temp$+=STR$(ra%(0,j%,i%)) 20100IFj%<1 temp$+="." 20110NEXT 20120ENDIF 20130text$+=FNpad(temp$,7) 20140ENDIF 20160IFFNselected(saveas3_window%,age1_opt_icon%)THEN 20170temp$=FNage(test%(0,0),test%(1,0),test%(2,0),dob%(0,i%),dob%(1,i%),dob%(2,i%)) 20180IFtemp$="0.0"temp$="" 20190text$+=FNpad(temp$,7) 20200ENDIF 20220IFFNselected(saveas3_window%,ra2_opt_icon%)THEN 20230temp$="" 20240IFra%(1,0,i%)<>0ORra%(1,1,i%)<>0THEN 20250FORj%=0TO1 20260temp$+=STR$(ra%(1,j%,i%)) 20270IFj%<1 temp$+="." 20280NEXT 20290ENDIF 20300text$+=FNpad(temp$,7) 20310ENDIF 20330IFFNselected(saveas3_window%,age2_opt_icon%)THEN 20340temp$=FNage(test%(0,1),test%(1,1),test%(2,1),dob%(0,i%),dob%(1,i%),dob%(2,i%)) 20350IFtemp$="0.0"temp$="" 20360text$+=FNpad(temp$,7) 20370ENDIF 20390IFFNselected(saveas3_window%,aget_opt_icon%)THEN 20400text$+=FNpad(FNage(d%,m%,y%,dob%(0,i%),dob%(1,i%),dob%(2,i%)),5) 20410ENDIF 20430PROCoutput(handle%,text$) 20450NEXT 20470CLOSE#handle% 20480OSCLI("*SetType "+filename$+" &FFF") 20500ask_to_save%=FALSE 20520SYS"Hourglass_Off" 20540ENDPROC 20570DEFPROCtodays_date(RETURNd%,RETURNm%,RETURNy%) 20590LOCALdate$,year$ 20600date$=FNsys_var("Sys$Date") 20610year$=FNsys_var("Sys$Year") 20620d%=VAL(MID$(date$,5,2)) 20630y%=VAL(RIGHT$(year$,2)) 20640CASEMID$(date$,8,3)OF 20650WHEN"Jan" 20660m%=1 20670WHEN"Feb" 20680m%=2 20690WHEN"Mar" 20700m%=3 20710WHEN"Apr" 20720m%=4 20730WHEN"May" 20740m%=5 20750WHEN"Jun" 20760m%=6 20770WHEN"Jul" 20780m%=7 20790WHEN"Aug" 20800m%=8 20810WHEN"Sep" 20820m%=9 20830WHEN"Oct" 20840m%=10 20850WHEN"Nov" 20860m%=11 20870WHEN"Dec" 20880m%=12 20890ENDCASE 20910ENDPROC 20940DEFFNpad(t$,c%) 20960IFFNselected(saveas3_window%,tab_icon%)THEN=t$+CHR$(9) 20970IFFNselected(saveas3_window%,comma_icon%)THEN=t$+"," 20990=t$+STRING$(c%-LEN(t$)," ") 21020DEFFNselected(w%,i%) 21040LOCALflag% 21060temp_blk%!0=w% 21070temp_blk%!4=i% 21080SYS"Wimp_GetIconState",,temp_blk% 21090flag%=temp_blk%!24 21100IF(flag%AND&200000)=&200000THEN=TRUE 21110=FALSE 21140DEFPROCremove_record(r%) 21160IFno_of_records%=0PROCwipe_record:ENDPROC 21170LOCALi% 21190FORi%=r%TOno_of_records%-1 21200name$(0,i%)=name$(0,i%+1) 21210name$(1,i%)=name$(1,i%+1) 21220dob%(0,i%)=dob%(0,i%+1) 21230dob%(1,i%)=dob%(1,i%+1) 21240dob%(2,i%)=dob%(2,i%+1) 21250ra%(0,0,i%)=ra%(0,0,i%+1) 21260ra%(0,1,i%)=ra%(0,1,i%+1) 21270ra%(1,0,i%)=ra%(1,0,i%+1) 21280ra%(1,1,i%)=ra%(1,1,i%+1) 21290NEXT 21310PROCwipe_entry(no_of_records%) 21320no_of_records%-=1 21330ask_to_save%=TRUE 21350ENDPROC 21380DEFPROCadd_record(r%,before%) 21400IFno_of_records%=max_no_of_records%THEN 21410PROCreport_error("Sorry! Maximum of "+STR$(max_no_of_records%+1)+" records allowed.",TRUE,FALSE,false%) 21420ENDPROC 21430ENDIF 21450LOCALi% 21470IFbefore%r%-=1 21490FORi%=no_of_records%+1TOr%+2STEP-1 21500name$(0,i%)=name$(0,i%-1) 21510name$(1,i%)=name$(1,i%-1) 21520dob%(0,i%)=dob%(0,i%-1) 21530dob%(1,i%)=dob%(1,i%-1) 21540dob%(2,i%)=dob%(2,i%-1) 21550ra%(0,0,i%)=ra%(0,0,i%-1) 21560ra%(0,1,i%)=ra%(0,1,i%-1) 21570ra%(1,0,i%)=ra%(1,0,i%-1) 21580ra%(1,1,i%)=ra%(1,1,i%-1) 21590NEXT 21610PROCwipe_entry(r%+1) 21620no_of_records%+=1 21630ask_to_save%=TRUE 21650ENDPROC 21680DEFPROCwipe_entry(r%) 21700name$(0,r%)="" 21710name$(1,r%)="" 21720dob%(0,r%)=0 21730dob%(1,r%)=0 21740dob%(2,r%)=0 21750ra%(0,0,r%)=0 21760ra%(0,1,r%)=0 21770ra%(1,0,r%)=0 21780ra%(1,1,r%)=0 21800ENDPROC 21830DEFPROCgoto 21850LOCALr%,find$,start%,i% 21870IFFNselected(goto_window%,record_rad_icon%)THEN 21890r%=VAL(FNget_text(goto_window%,record_wri_icon%))-1 21900IFr%>no_of_records%r%=no_of_records% 21910IFr%<0 r%=0 21920PROCput_text(goto_window%,record_wri_icon%,STR$(r%)) 21930PROCsave_record(current_record%) 21940current_record%=r% 21950PROCload_record(current_record%) 21970ELSE 21990find$=FNto_lower(FNget_text(goto_window%,name_wri_icon%)) 22000start%=current_record% 22010i%=start% 22030REPEAT 22040i%+=1 22050IFi%>no_of_records%i%=0 22060UNTILINSTR(FNto_lower(name$(0,i%)),find$)<>0ORINSTR(FNto_lower(name$(1,i%)),find$)<>0ORi%=start% 22080IFINSTR(FNto_lower(name$(0,i%)),find$)<>0ORINSTR(FNto_lower(name$(1,i%)),find$)<>0THEN 22090PROCsave_record(current_record%) 22100current_record%=i% 22110PROCload_record(current_record%) 22120ELSE 22130PROCreport_error("Not found!",TRUE,FALSE,false%) 22140ENDIF 22160ENDIF 22180ENDPROC 22210DEFFNto_lower(word$) 22230LOCALi%,temp$,let% 22250temp$="" 22270FORi%=1TOLEN(word$) 22280let%=ASC(MID$(word$,i%,1)) 22290IFlet%>64AND let%<91 let%+=32 22300temp$+=CHR$(let%) 22310NEXT 22330=temp$ 22360DEFPROCtick_item(menu%,item%) 22380!(menu%+28+24*item%)=(!(menu%+28+24*item%)AND&FFFFFFFE)OR1 22400ENDPROC 22430DEFPROCuntick_item(menu%,item%) 22450!(menu%+28+24*item%)=!(menu%+28+24*item%)AND&FFFFFFFE 22470ENDPROC 22500DEFPROCshade_item(menu%,item%) 22520!(menu%+28+24*item%+8)=(!(menu%+28+24*item%+8)AND&FFBFFFFF)OR&400000 22540ENDPROC 22570DEFPROCunshade_item(menu%,item%) 22590!(menu%+28+24*item%+8)=!(menu%+28+24*item%+8)AND&FFBFFFFF 22610ENDPROC 22640DEFFNticked(menu%,item%) 22660IF(!(menu%+28+24*item%)AND&1)=&1THEN=TRUE 22670=FALSE 22700DEFPROCauto_save 22720LOCALf$ 22740IFauto_remind%ANDFNask2saveTHEN 22750auto_remind%=FALSE 22760IFFNget_text(saveas1_window%,filename_icon%)="RA�Data"THEN 22770PROCreport_error("Please use the auto-save feature. Save the data, then select auto-save from the main menu.",TRUE,FALSE,false%) 22780ENDPROC 22790ELSE 22800IFNOTFNticked(main_menu%,2)THEN 22810PROCreport_error("Please use the auto-save feature. Select auto-save from the main menu.",TRUE,FALSE,false%) 22820ENDPROC 22830ENDIF 22840ENDIF 22850ENDIF 22870IFNOTFNticked(main_menu%,2)ENDPROC 22890IFFNget_text(saveas1_window%,filename_icon%)="RA�Data"THEN 22900PROCreport_error("In order to auto-save you must first save the data somewhere!",TRUE,FALSE,false%) 22910ENDPROC 22920ENDIF 22940f$=FNget_text(saveas1_window%,filename_icon%) 22950f$=FNpath(f$)+LEFT$(FNleaf(f$),6)+"_bak" 22960IFFNticked(main_menu%,2)PROCsave_data(f$) 22970ask_to_save%=TRUE 22990ENDPROC 23020DEFFNget_writable(menu%,item%) 23040LOCALptr%,text$ 23060ptr%=!(menu%+28+24*item%+12) 23080text$="" 23100WHILE?ptr%>31 23110text$+=CHR$(?ptr%) 23120ptr%+=1 23130ENDWHILE 23150=text$ 23180DEFPROCput_writable(menu%,item%,text$) 23200LOCALptr% 23210ptr%=!(menu%+28+24*item%+12) 23220$ptr%=text$+CHR$(0) 23240ENDPROC 23270DEFPROCinit_sort 23280fields%=7:fieldlen%=18 23290DIMfieldtype%(fields%) 23300DIMdata%max_no_of_records%*fieldlen% 23310DIMtable%max_no_of_records%*4 23330fieldtype%()=2 23340fieldtype%(0)=1 23350fieldtype%(1)=1 23370DIMIndex%(max_no_of_records%) 23390FORJ%=0TOno_of_records%:Index%(J%)=J%:NEXT 23410case%=4 23430ENDPROC 23460DEFPROCsort(records%,field%,case%) 23480LOCALJ%,type%,fad%,len%,a1%,a2%,d%,m%,y% 23510a1%=data%:a2%=table% 23520PROCtodays_date(d%,m%,y%) 23540CASEfieldtype%(field%)OF 23550WHEN1:type%=case%:len%=fieldlen% 23560FORJ%=0TOrecords% 23570$a1%=FNdata(J%,field%,d%,m%,y%):!a2%=a1%:a1%+=len%:a2%+=4 23580NEXT 23590WHEN2:type%=3:len%=4 23600FORJ%=0TOrecords% 23610!a1%=VAL(FNdata(J%,field%,d%,m%,y%)):!a2%=a1%:a1%+=len%:a2%+=4 23620NEXT 23630ENDCASE 23640fad%=!table% 23670SYS"OS_HeapSort",records%+1,table%,type% 23680PROCtransferOut(0,records%) 23700PROCrearrange 23720ENDPROC 23750DEFFNdata(record%,field%,d%,m%,y%) 23770LOCALs$ 23780s$="" 23800CASEfield%OF 23810WHEN0 23820s$=name$(0,record%)+name$(1,record%) 23830WHEN1 23840s$=name$(1,record%)+name$(0,record%) 23850WHEN2 23860s$=STR$((ra%(0,0,(record%))+ra%(0,1,(record%))/12)*100) 23870WHEN3 23880s$=STR$((ra%(1,0,(record%))+ra%(1,1,(record%))/12)*100) 23890WHEN4 23900s$=STR$((VAL(FNage(d%,m%,y%,dob%(0,(record%)),dob%(1,(record%)),dob%(2,(record%)))))*100) 23910WHEN5 23920s$=STR$(FNage_diff(record%,0)*1000) 23930WHEN6 23940s$=STR$(FNage_diff(record%,1)*1000) 23950ENDCASE 23970IFcase%=4 s$=FNto_lower(s$) 23980=s$ 24010DEFPROCtransferOut(f%,t%) 24030a%=table% 24040FORJ%=f%TOt% 24050p%=!a% 24060r%=p%-fad% 24070Index%(J%)=r%DIVlen% 24080a%+=4 24090NEXT 24100ENDPROC 24130DEFPROCrearrange 24150LOCALi%,j%,k%,data_ptr% 24170FORj%=0TO1 24190data_ptr%=data% 24210FORi%=0TOno_of_records% 24220$data_ptr%=name$(j%,Index%(i%)) 24230data_ptr%+=fieldlen% 24240NEXT 24260data_ptr%=data% 24280FORi%=0TOno_of_records% 24290name$(j%,i%)=$data_ptr% 24300data_ptr%+=fieldlen% 24310NEXT 24330NEXT 24350FORj%=0TO2 24360data_ptr%=data% 24370FORi%=0TOno_of_records% 24380!data_ptr%=dob%(j%,Index%(i%)) 24390data_ptr%+=4 24400NEXT 24410data_ptr%=data% 24420FORi%=0TOno_of_records% 24430dob%(j%,i%)=!data_ptr% 24440data_ptr%+=4 24450NEXT 24460NEXT 24480FORk%=0TO1 24490FORj%=0TO1 24500data_ptr%=data% 24510FORi%=0TOno_of_records% 24520!data_ptr%=ra%(k%,j%,Index%(i%)) 24530data_ptr%+=4 24540NEXT 24550data_ptr%=data% 24560FORi%=0TOno_of_records% 24570ra%(k%,j%,i%)=!data_ptr% 24580data_ptr%+=4 24590NEXT 24600NEXT 24610NEXT 24630ENDPROC
ș"Hourglass_On" app_version$="0.8" �wimp_init (�init_sort 2�init_draw <ș"Hourglass_Off" F�poll_loop P� x��wimp_init ��:�" at line ";�/10:� �)�blk%&900,temp_blk%&900,errorblk%&100 ��workstart%&2048 "workfree%=workstart% ,workend%=workstart%+&2048 T �menu%600 hmenu_end%=menu%+600 ��menu_ind%100 �menu_ind_end%=menu_ind%+100 �app_name$="!ReadAge" �%app_purpose$="To be useful!!!!!!" �*app_directory$=�sys_var("ReadAge$Dir") �errorcount%=0 �false%=� &icon_bar%=-2 :select_click%=4 Dadjust_click%=1 Nselect_drag%=64 Xadjust_drag%=16 bmenu_click%=2 vpoll_mask%=0 �poll_mask%=poll_mask%�1<<1 �poll_mask%=poll_mask%�1<<4 �poll_mask%=poll_mask%�1<<5 �poll_mask%=poll_mask%�1<<11 �poll_mask%=poll_mask%�1<<12 �sec=100 �min=60*sec �'ș"OS_ReadMonotonicTime"�poll_time% �auto_save_time%=5*min �poll_time%+=auto_save_time% �auto_remind%=� quit%=� sure%=� Hask_to_save%=� Rfile_icon%=1 \filename_icon%=2 fok_icon%=3 z�drag_init �gpname_icon%=2 �name1_icon%=3 �name2_icon%=4 �dobd_icon%=5 �dobm_icon%=6 �doby_icon%=7 �ra1y_icon%=8 �ra1m_icon%=9 �ra2y_icon%=10 �ra2m_icon%=11 tst1d_icon%=12 tst1m_icon%=13 tst1y_icon%=14 $tst2d_icon%=15 .tst2m_icon%=16 8tst2y_icon%=17 Bnoingp_icon%=18 Lnooftests_icon%=19 Vrecord_icon%=20 `backward_icon%=21 jadd_icon%=22 tsearch_icon%=23 ~take_icon%=24 �forward_icon%=25 �chage_icon%=26 �ra1_icon%=27 �ra2_icon%=28 �tst1_icon%=29 �tst2_icon%=30 �discard_icon%=1 �save_icon%=2 �cancel_icon%=3 app_name_icon%=1 (purpose_icon%=2 2version_icon%=3 ZSortName1_icon%=2 dSortName2_icon%=3 nSortRA1C_icon%=4 xSortRA2C_icon%=5 �SortRA1_icon%=6 �SortRA2_icon%=7 �SortChr_icon%=8 �SortCancel_icon%=10 �SortOK_icon%=11 �max_no_of_records%=61 �no_of_records%=0 �no_of_tests%=1 �current_record%=0 group$="" �name$(1,max_no_of_records%) �dob%(2,max_no_of_records%) " �ra%(1,1,max_no_of_records%) ,�test%(2,no_of_tests%) @��error:�quit rEș"Wimp_Initialise",200,&4B534154,app_name$�version%,task_handle% �!temp_blk%=-1 �temp_blk%!4=0 �temp_blk%!8=0 �temp_blk%!12=68 �temp_blk%!16=68 �temp_blk%!20=&1700202A �$(temp_blk%+24)=app_name$ �3ș"Wimp_CreateIcon",,temp_blk%�icon_bar_handle% \main_window%=�get_window_template(app_directory$+".Templates","Main",workfree%,workend%) bmessage_window%=�get_window_template(app_directory$+".Templates","Message",workfree%,workend%) &bsaveas1_window%=�get_window_template(app_directory$+".Templates","SaveAs1",workfree%,workend%) 0bsaveas2_window%=�get_window_template(app_directory$+".Templates","SaveAs2",workfree%,workend%) :bsaveas3_window%=�get_window_template(app_directory$+".Templates","SaveAs3",workfree%,workend%) D^about_window%=�get_window_template(app_directory$+".Templates","About",workfree%,workend%) N\goto_window%=�get_window_template(app_directory$+".Templates","Goto",workfree%,workend%) X\sort_window%=�get_window_template(app_directory$+".Templates","Sort",workfree%,workend%) lname_opt_icon%=6 v0�select_icon(saveas3_window%,name_opt_icon%) �dob_opt_icon%=7 �/�select_icon(saveas3_window%,dob_opt_icon%) �ra1_opt_icon%=8 �/�select_icon(saveas3_window%,ra1_opt_icon%) �ra2_opt_icon%=9 �/�select_icon(saveas3_window%,ra2_opt_icon%) �aget_opt_icon%=10 �2�deselect_icon(saveas3_window%,aget_opt_icon%) �age1_opt_icon%=11 �0�select_icon(saveas3_window%,age1_opt_icon%) �age2_opt_icon%=12 �0�select_icon(saveas3_window%,age2_opt_icon%) �tab_icon%=14 space_icon%=15 -�select_icon(saveas3_window%,space_icon%) comma_icon%=16 >5�put_text(about_window%,app_name_icon%,app_name$) H7�put_text(about_window%,version_icon%,app_version$) R7�put_text(about_window%,purpose_icon%,app_purpose$) z<�put_text(main_window%,noingp_icon%,�(no_of_records%+1)) �=�put_text(main_window%,nooftests_icon%,�(no_of_tests%+1)) �=�put_text(main_window%,record_icon%,�(current_record%+1)) �record_rad_icon%=2 �record_wri_icon%=3 �name_rad_icon%=4 �name_wri_icon%=5 �goto_cancel_icon%=8 �goto_ok_icon%=7 �/�put_text(goto_window%,record_wri_icon%,"") -�put_text(goto_window%,name_wri_icon%,"") -�select_icon(goto_window%,name_rad_icon%) .�shade_icon(goto_window%,record_wri_icon%) $.�unshade_icon(goto_window%,name_wri_icon%) 8.�select_icon(sort_window%,SortName1_icon%) Lcurrent_test%=0 V�select_test(1,�) ~=icon_bar_menu%=�dim_menu(menu%,menu_end%,2,100,app_name$) �M�menu_entry("Info",menu%,menu_ind%,menu_ind_end%,about_window%,�,�,�,�,�) �A�menu_entry("Quit",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) �@add_icon_menu%=�dim_menu(menu%,menu_end%,2,180,"Add record") �C�menu_entry("Before",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) �B�menu_entry("After",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) �9search_menu%=�dim_menu(menu%,menu_end%,2,180,"Query") �G�menu_entry("Find... F4",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) �R�menu_entry("Sort F5",menu%,menu_ind%,menu_ind_end%,sort_window%,�,�,�,�,�) �=take_icon_menu%=�dim_menu(menu%,menu_end%,2,180,"Delete") A�menu_entry("Wipe",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) C�menu_entry("Remove",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) 6save_menu%=�dim_menu(menu%,menu_end%,3,290,"Save") ([�menu_entry("Save data F3",menu%,menu_ind%,menu_ind_end%,saveas1_window%,�,�,�,�,�) 2[�menu_entry("Save graph ���F3",menu%,menu_ind%,menu_ind_end%,saveas2_window%,�,�,�,�,�) <[�menu_entry("Save text� ��~F3",menu%,menu_ind%,menu_ind_end%,saveas3_window%,�,�,�,�,�) P>auto_menu%=�dim_menu(menu%,menu_end%,1,200,"Time (mins)") ZQ�menu_entry(�(auto_save_time%/min),menu%,menu_ind%,menu_ind_end%,�,�,�,6,�,�) n9main_menu%=�dim_menu(menu%,menu_end%,4,160,app_name$) xM�menu_entry("Info",menu%,menu_ind%,menu_ind_end%,about_window%,�,�,�,�,�) �J�menu_entry("Save",menu%,menu_ind%,menu_ind_end%,save_menu%,�,�,�,�,�) �O�menu_entry("Auto-save",menu%,menu_ind%,menu_ind_end%,auto_menu%,�,�,�,�,�) �E�menu_entry("Wipe all",menu%,menu_ind%,menu_ind_end%,�,�,�,�,�,�) �� ���poll_loop �� �7ș"Wimp_PollIdle",poll_mask%,blk%,poll_time%�event% Ȏevent%� �0 �ask2save�auto_save "'ș"OS_ReadMonotonicTime"�poll_time% ,poll_time%+=auto_save_time% J�2 Tș"Wimp_OpenWindow",,blk% h�3 rș"Wimp_CloseWindow",,blk% ��6 ��mouse_button ��7 ��drag_over ��8 ��key_press ��9 ��menu_click ��17 �message �18 &�message 0� D�quit%�check X �sure% l �quit �� �ݤsys_var(var$) ��lenth% �6ș"XOS_ReadVarVal",var$+�(0),temp_blk%,-1�,,lenth% �8�lenth%=0��0,"System variable '"+var$+"' not found!" �:ș"XOS_ReadVarVal",var$+�(0),temp_blk%,255,,3�,,lenth% ?(temp_blk%+lenth%)=13 =$temp_blk% *��error >errorcount%+=1 H)�errorcount%>5:��0,"Too many errors!" \ș"XWimp_CloseTemplate" f�c%<>0��#c% pș"Hourglass_Smash" �!errorblk%=� �)$(errorblk%+4)=�$+" at line "+�(��10) �.ș"Wimp_ReportError",errorblk%,1,app_name$ �� � ��quit �-ș"Wimp_CloseDown",task_handle%,&4B534154 �� �� 2ݤget_window_template(file$,name$,�free%,end%) �handle%,found% $ ș"Wimp_OpenTemplate",,file$ .Gș"Wimp_LoadTemplate",,blk%,free%,end%,-1,name$,0�,,free%,,,,found% 8�found%� B'ș"Wimp_CreateWindow",,blk%�handle% L� V6��0,"Window "+name$+" not found in template file!" `� jș"Wimp_CloseTemplate" t=handle% �#��put_text(window%,icon%,text$) ��text$="0"text$="" �temp_blk%!0=window% �temp_blk%!4=icon% �$ș"Wimp_GetIconState",,temp_blk% ��(temp_blk%!24�&101)<>&101� �,�202,"Icon "+�(icon%)+" not indirected!" �� �� � text$=�text$,temp_blk%!36-1) $temp_blk%!28=text$ temp_blk%!8=0 temp_blk%!12=0 ($ș"Wimp_SetIconState",,temp_blk% 2� Pݤget_text(window%,icon%) Z!temp_blk%=window% dtemp_blk%!4=icon% n$ș"Wimp_GetIconState",,temp_blk% x�(temp_blk%!24�&101)<>&101� �,�202,"Icon "+�(icon%)+" not indirected!" �="" �� �=$temp_blk%!28 ���open_window(window%) �!temp_blk%=window% �&ș"Wimp_GetWindowState",,temp_blk% �"ș"Wimp_OpenWindow",,temp_blk% �� � ��message �click% ,Ȏblk%!16� @�0 J�ask2save� Tclick%=� ^X�report_error("The Current data is UNsaved. OK to save, CANCEL to quit.",�,�,click%) h�click%=1� r3�open_save_window(main_window%,saveas1_window%) |quit%=� �� � �quit �� �� � �quit �� ��1 ��save_request ��3 ��load_request �2 �save_demand &�5 0�blk%!40=&DFE��load_request D�4 N�close_menu X� l� ���mouse_button �mousex%=blk%!0 �mousey%=blk%!4 �mousebut%=blk%!8 �window_handle%=blk%!12 �icon_handle%=blk%!16 �Ȏwindow_handle%� ��main_window% ��main_window_click �icon_bar% �icon_bar_click *4�saveas1_window%,saveas2_window%,saveas3_window% 4&�save_window_click(window_handle%) H�goto_window% RȎicon_handle%� \�goto_ok_icon% f �goto p�close_menu z�goto_cancel_icon% ��close_menu ��record_rad_icon% �+�select_icon(goto_window%,icon_handle%) �,�shade_icon(goto_window%,name_wri_icon%) �0�unshade_icon(goto_window%,record_wri_icon%) �-�set_caret(goto_window%,record_wri_icon%) ��name_rad_icon% �+�select_icon(goto_window%,icon_handle%) �.�shade_icon(goto_window%,record_wri_icon%) �.�unshade_icon(goto_window%,name_wri_icon%) �+�set_caret(goto_window%,name_wri_icon%) �� �sort_window% Ȏicon_handle%� �SortCancel_icon% $�close_menu .�SortOK_icon% 8ș"Hourglass_On" B!�save_record(current_record%) LI�selected(sort_window%,SortName1_icon%)�sort(no_of_records%,0,case%) VI�selected(sort_window%,SortName2_icon%)�sort(no_of_records%,1,case%) `G�selected(sort_window%,SortRA1_icon%)�sort(no_of_records%,2,case%) jG�selected(sort_window%,SortRA2_icon%)�sort(no_of_records%,3,case%) tG�selected(sort_window%,SortChr_icon%)�sort(no_of_records%,4,case%) ~H�selected(sort_window%,SortRA1C_icon%)�sort(no_of_records%,5,case%) �H�selected(sort_window%,SortRA2C_icon%)�sort(no_of_records%,6,case%) �ș"Hourglass_Off" ��close_menu �!�load_record(current_record%) �ask_to_save%=� �� ��message_window% �Ȏicon_handle%� ��cancel_icon% ��close_menu ��save_icon% 3�open_save_window(main_window%,saveas1_window%) �discard_icon% sure%=� � 2� F� d��icon_bar_click xȎmousebut%� ��menu_click% � current_menu%=icon_bar_menu% �menu_x%=mousex%-64 �no_of_items%=2 �no_of_dotted%=0 �3menu_y%=96+(no_of_items%*44)+(no_of_dotted%*24) �6ș"Wimp_CreateMenu",,current_menu%,menu_x%,menu_y% �select_click%,adjust_click% C�open_window(main_window%):�set_caret(main_window%,name1_icon%) ,� @� ^5ݤdim_menu(�ptr%,end%,no_of_items%,width%,title$) r7�(ptr%+28)+(no_of_items%*24)>end%�0,"Menu overflow" |name%=ptr% �$ptr%=�title$,12)+�(0) � ptr%!12=7 � ptr%!13=2 � ptr%!14=7 � ptr%!15=0 �ptr%!16=width% �ptr%!20=44 � ptr%!24=0 �ptr%+=28 �=ptr%-28 �Y��menu_entry(text$,�ptr%,�ind_ptr%,end%,sub%,ticked%,dotted%,writable%,shaded%,last%) �menuflag%,iconflag% menuflag%=0 &�sub%=�sub%=0 0$�ticked%menuflag%=menuflag%�1<<0 :$�dotted%menuflag%=menuflag%�1<<1 D&�writable%menuflag%=menuflag%�1<<2 N"�last%menuflag%=menuflag%�1<<7 biconflag%=0 liconflag%=iconflag%�1<<0 viconflag%=iconflag%�1<<5 �%�shaded%iconflag%=iconflag%�1<<22 �iconflag%=iconflag%�7<<24 �!ptr%=menuflag% �ptr%!4=sub% ��(text$)>12�writable%� �:�ind_ptr%+�(text$)+1>end%�0,"Indirected menu overflow" �$ind_ptr%=text$+�(0) �ptr%!12=ind_ptr% �ind_ptr%+=�(text$)+1 ��writable%� �$ind_ptr%="A0-9mins"+�(0) ptr%!16=ind_ptr% ind_ptr%+=9 ptr%!20=writable% � *?ind_ptr%=0 4ptr%!16=ind_ptr% >ind_ptr%+=1 Hptr%!20=�(text$)+1 R� \iconflag%=iconflag%�1<<8 f� p$(ptr%+12)=�text$,12)+�(0) z� �ptr%!8=iconflag% �ptr%+=24 �� ���menu_click ��i%,click% �menu$="" i%=0 � $menu$=menu$+�(blk%!i%) . i%+=4 8�blk%!i% LȎcurrent_menu%� `�icon_bar_menu% j�icon_bar_menu ~�main_menu% �Ȏmenu$� ��"2" ��ticked(main_menu%,2)� ��untick_item(main_menu%,2) �� ��tick_item(main_menu%,2) �� ��"3" � �chk_wipe � �"20" ��tick_item(main_menu%,2) �9auto_save_time%=�(�(�get_writable(auto_menu%,0)))*min 1�auto_save_time%/min>99 auto_save_time%=5*min 0�auto_save_time%/min<1 auto_save_time%=5*min 'ș"OS_ReadMonotonicTime"�poll_time% poll_time%+=auto_save_time% (� <�add_icon_menu% F!�save_record(current_record%) PȎmenu$� Z�"0" d"�add_record(current_record%,�) n�"1" x"�add_record(current_record%,�) �current_record%+=1 �� �<�put_text(main_window%,noingp_icon%,�(no_of_records%+1)) �!�load_record(current_record%) ��search_menu% �Ȏmenu$� ��"0" �!�save_record(current_record%) �0�open_save_window(main_window%,goto_window%) �~�selected(goto_window%,record_rad_icon%)�set_caret(goto_window%,record_wri_icon%)��set_caret(goto_window%,name_wri_icon%) �� �take_icon_menu% Ȏmenu$� �"0" "click%=� ,J�report_error("Are you sure you wish to wipe this record?",�,�,click%) 6�click%=1�wipe_record @�"1" Jclick%=� TL�report_error("Are you sure you wish to remove this record?",�,�,click%) ^�click%=1� h#�remove_record(current_record%) rA�current_record%>no_of_records%current_record%=no_of_records% |<�put_text(main_window%,noingp_icon%,�(no_of_records%+1)) �=�put_text(main_window%,record_icon%,�(current_record%+1)) �!�load_record(current_record%) �� �� �� �!ș"Wimp_GetPointerInfo",,blk% �K�blk%!8=adjust_click%ș"Wimp_CreateMenu",,current_menu%,menu_x%,menu_y% �� ���icon_bar_menu Ȏmenu$� &�"1" 0quit%=� D� X� v��main_window_click � �open% �Ȏicon_handle%� ��search_icon% �current_menu%=search_menu% �open%=� ��add_icon% � current_menu%=add_icon_menu% �open%=� �take_icon% !current_menu%=take_icon_menu% open%=� *� >$�mousebut%=menu_click%� open%=�� H=�put_writable(auto_menu%,0,�(auto_save_time%/min)+"mins") Rcurrent_menu%=main_menu% \open%=� f� z�open%� �menu_x%=mousex%-64 �menu_y%=mousey% �6ș"Wimp_CreateMenu",,current_menu%,menu_x%,menu_y% �� �� �Ȏicon_handle%� ��forward_icon% �.�mousebut%=select_click%�forward��backward ��backward_icon% .�mousebut%=select_click%�backward��forward �ra1_icon%,tst1_icon% $?�mousebut%=select_click%�select_test(1,�)��select_test(2,�) 8�ra2_icon%,tst2_icon% B?�mousebut%=select_click%�select_test(2,�)��select_test(1,�) V� j� �#��get_icon_state(window%,icon%) �!blk%=window% �blk%!4=icon% �ș"Wimp_GetIconState",,blk% �� �#��set_icon_state(window%,icon%) �!blk%=window% blk%!4=icon% ș"Wimp_SetIconState",,blk% � < ��select_icon(window%,icon%) P�clear_word%,eor_word% Zclear_word%=1<<21 deor_word%=1<<21 nblk%!8=eor_word% xblk%!12=clear_word% �"�set_icon_state(window%,icon%) �� ���shade_icon(window%,icon%) ��clear_word%,eor_word% �clear_word%=1<<22 �eor_word%=1<<22 �blk%!8=eor_word% �blk%!12=clear_word% �"�set_icon_state(window%,icon%) � ,"��deselect_icon(window%,icon%) @�clear_word%,eor_word% Jclear_word%=1<<21 Teor_word%=0 ^blk%!8=eor_word% hblk%!12=clear_word% r"�set_icon_state(window%,icon%) �� �!��unshade_icon(window%,icon%) ��clear_word%,eor_word% �clear_word%=1<<22 �eor_word%=0 �blk%!8=eor_word% �blk%!12=clear_word% �"�set_icon_state(window%,icon%) �� "ݤage(td%,tm%,ty%,bd%,bm%,by%) & �y%,m% 0y%=ty%-by% :m%=tm%-bm% D�td%<bd%m%-=1 N�m%<0 y%-=1:m%=m%+12 X�y%<0�m%<0�="" b=�(y%)+"."+�(m%) �"��select_test(test%,ch_icons%) ��td$,tm$,ty$,bd$,bm$,by$ �*bd$=�get_text(main_window%,dobd_icon%) �*bm$=�get_text(main_window%,dobm_icon%) �*by$=�get_text(main_window%,doby_icon%) �Ȏtest%� ��1 ��ch_icons%� �(�select_icon(main_window%,ra1_icon%) !)�select_icon(main_window%,tst1_icon%) !*�deselect_icon(main_window%,ra2_icon%) !+�deselect_icon(main_window%,tst2_icon%) ! � !4+td$=�get_text(main_window%,tst1d_icon%) !>+tm$=�get_text(main_window%,tst1m_icon%) !H+ty$=�get_text(main_window%,tst1y_icon%) !\current_test%=1 !p�2 !z�ch_icons%� !�(�select_icon(main_window%,ra2_icon%) !�)�select_icon(main_window%,tst2_icon%) !�*�deselect_icon(main_window%,ra1_icon%) !�+�deselect_icon(main_window%,tst1_icon%) !�� !�+td$=�get_text(main_window%,tst2d_icon%) !�+tm$=�get_text(main_window%,tst2m_icon%) !�+ty$=�get_text(main_window%,tst2y_icon%) !�current_test%=2 !�� "/�td$=""�tm$=""�ty$=""�bd$=""�bm$=""�by$=""� "current_age$="--.--" "$� ".@current_age$=�age(�(td$),�(tm$),�(ty$),�(bd$),�(bm$),�(by$)) "8� "L4�put_text(main_window%,chage_icon%,current_age$) "`� "~��save_record(record_no%) "��chk_record(record_no%)� "�;name$(0,record_no%)=�get_text(main_window%,name1_icon%) "�;name$(1,record_no%)=�get_text(main_window%,name2_icon%) "�<dob%(0,record_no%)=�(�get_text(main_window%,dobd_icon%)) "�<dob%(1,record_no%)=�(�get_text(main_window%,dobm_icon%)) "�<dob%(2,record_no%)=�(�get_text(main_window%,doby_icon%)) "�=ra%(0,0,record_no%)=�(�get_text(main_window%,ra1y_icon%)) "�=ra%(0,1,record_no%)=�(�get_text(main_window%,ra1m_icon%)) "�=ra%(1,0,record_no%)=�(�get_text(main_window%,ra2y_icon%)) "�=ra%(1,1,record_no%)=�(�get_text(main_window%,ra2m_icon%)) "�ask_to_save%=� # � #� #2��load_record(record_no%) #F8�put_text(main_window%,record_icon%,�(record_no%+1)) #Z;�put_text(main_window%,name1_icon%,name$(0,record_no%)) #d;�put_text(main_window%,name2_icon%,name$(1,record_no%)) #n<�put_text(main_window%,dobd_icon%,�(dob%(0,record_no%))) #x<�put_text(main_window%,dobm_icon%,�(dob%(1,record_no%))) #�<�put_text(main_window%,doby_icon%,�(dob%(2,record_no%))) #�=�put_text(main_window%,ra1y_icon%,�(ra%(0,0,record_no%))) #�=�put_text(main_window%,ra1m_icon%,�(ra%(0,1,record_no%))) #�=�put_text(main_window%,ra2y_icon%,�(ra%(1,0,record_no%))) #�=�put_text(main_window%,ra2m_icon%,�(ra%(1,1,record_no%))) #�!�select_test(current_test%,�) #�(�set_caret(main_window%,name1_icon%) #�� #� ��forward $!�save_record(current_record%) $"current_record%+=1 $,4�current_record%>no_of_records%current_record%=0 $@!�load_record(current_record%) $T� $r��backward $�!�save_record(current_record%) $�current_record%-=1 $�5�current_record%<0 current_record%=no_of_records% $�!�load_record(current_record%) $�� $���save_data(filename$) $��handle%,i%,j%,text$ %� %i���report_error("Not found",�,�,false%):�report_error("Bad file name: '"+filename$+"'",�,�,false%):� %0ș"Hourglass_On" %D!�save_record(current_record%) %Xhandle%=�(filename$) %l9�output(handle%,�get_text(main_window%,gpname_icon%)) %�}text$=�get_text(main_window%,tst1d_icon%)+","+�get_text(main_window%,tst1m_icon%)+","+�get_text(main_window%,tst1y_icon%) %���(�get_text(main_window%,tst2d_icon%))<>0��(�get_text(main_window%,tst2m_icon%))<>0��(�get_text(main_window%,tst2y_icon%))<>0� %��text$+=","+�get_text(main_window%,tst2d_icon%)+","+�get_text(main_window%,tst2m_icon%)+","+�get_text(main_window%,tst2y_icon%) %�� %��output(handle%,text$) %��i%=0�no_of_records% %�%text$=name$(0,i%)+","+name$(1,i%) %��j%=0�2 %�text$+=","+�(dob%(j%,i%)) %�� %��j%=0�1 &text$+=","+�(ra%(0,j%,i%)) &� &#�ra%(1,0,i%)<>0�ra%(1,1,i%)<>0� & �j%=0�1 &*text$+=","+�(ra%(1,j%,i%)) &4� &>� &H�output(handle%,text$) &\� &p �#handle% &z$�("*SetType "+filename$+" &DFE") &�ask_to_save%=� &�ș"Hourglass_Off" &�� &���set_caret(window%,icon%) &�"�get_icon_state(window%,icon%) &�>ș"Wimp_SetCaretPosition",window%,icon%,0,0,-1,�($blk%!28) '� '. ��save_window_click(window%) 'B�filename$ 'VȎmousebut%� 'j �select_click%,adjust_click% 't�icon_handle%=ok_icon%� '~/filename$=�get_text(window%,filename_icon%) '��filename$,".")� '�Ȏwindow%� '��saveas1_window% '��save_data(filename$) '��saveas2_window% '��save_draw(filename$) '��saveas3_window% '��save_text(filename$) '�� '��close_menu '�� '�M�report_error("To save, drag the icon to a directory display",�,�,false%) ( � ( � (�select_drag%,adjust_drag% ((�icon_handle%=file_icon%� (2drag_window%=window% (<Ȏwindow%� (F�saveas1_window% (P3�drag_start(drag_window%,file_icon%,"file_dfe") (Z�saveas2_window% (d3�drag_start(drag_window%,file_icon%,"file_aff") (n�saveas3_window% (x3�drag_start(drag_window%,file_icon%,"file_fff") (�� (�� (�� (�� (�-��report_error(text$,ok%,cancel%,�click%) (�ș"Hourglass_Smash" (� �flag% (�flag%=0 (�flag%=flag%�1<<4 (��ok%flag%=flag%�1<<0 )�cancel%flag%=flag%�1<<1 )(text$=�(0)+�(0)+�(0)+�(0)+text$+�(0) )�click%� )"6ș"Wimp_ReportError",text$,flag%,app_name$�,click% ),� )6.ș"Wimp_ReportError",text$,flag%,app_name$ )@� )T� )r��drag_init )� �cmos )�)drag_start%=�swi("DragASprite_Start") )�'drag_stop%=�swi("DragASprite_Stop") )�ș"OS_Byte",161,28�,,cmos )�-�(cmos� 2)=0 drag_start%=-1:drag_stop%=-1 )�� )�ݤswi(swi$) )��swi )�.ș"XOS_SWINumberFromString",,swi$�swi;flag )��(flag� 1)swi=-1 *=swi *&/��drag_start(window%,icon%,drag_file_type$) *: �x%,y% *N!blk%=window% *X!ș"Wimp_GetWindowState",,blk% *bx%=blk%!4-blk%!20 *ly%=blk%!16-blk%!24 *�blk%!4=icon% *�ș"Wimp_GetIconState",,blk% *�blk%!4=5 *�blk%!8+=x% *�blk%!12+=y% *�blk%!16+=x% *�blk%!20+=y% *�blk%!24=-1 *�blk%!28=-1 *�blk%!32=&7FFFFFFF *�blk%!36=&7FFFFFFF +�drag_start%=-1� +ș"Wimp_DragBox",,blk% +� + <șdrag_start%,%11000101,1,drag_file_type$,blk%+8,blk%+24 +*� +4� +R��drag_over +f$�window%,icon%,x%,y%,file$,size% +zsize%=0 +��drag_stop%<>-1șdrag_stop% +�!ș"Wimp_GetPointerInfo",,blk% +� x%=blk%!0 +� y%=blk%!4 +�window%=blk%!12 +�icon%=blk%!16 +�i�window%<>saveas1_window%� window%<>saveas2_window%� window%<>saveas3_window%� window%<>main_window%� +�7file$=�leaf(�get_text(drag_window%,filename_icon%)) +�zblk%!0=256:blk%!12=0:blk%!16=1:blk%!20=window%:blk%!24=icon%:blk%!28=x%:blk%!32=y%:blk%!36=size%:$(blk%+44)=file$+�(0) +�Ȏdrag_window%� +��saveas1_window% ,blk%!40=&DFE ,�saveas2_window% ,blk%!40=&AFF ,$�saveas3_window% ,.blk%!40=&FFF ,8� ,B9ș"Wimp_SendMessage",17,blk%,window%,icon%�dest_task% ,L� ,`� ,~ݤleaf(path$) ,�ȕ�path$,".") ,�"path$=�path$,�path$,".",i%)+1) ,�� ,� =path$ ,�ݤpath(path$) ,��i% - ȕ�path$,".",i%) - i%=�path$,".",i%)+1 -� -(�i%=0 i%=�(path$)+1 -2=�path$,i%-1) -P��key_press -d-�window%,icon%,key%,file_name$,file_type$ -xwindow%=!blk% -�icon%=blk%!4 -�key%=blk%!24 -��key%=27�close_menu -�Ȏkey%� -��387 -�3�open_save_window(main_window%,saveas1_window%) -�.�set_caret(saveas1_window%,filename_icon%) -��388 -�0�open_save_window(main_window%,goto_window%) -�~�selected(goto_window%,record_rad_icon%)�set_caret(goto_window%,record_wri_icon%)��set_caret(goto_window%,name_wri_icon%) -��389 .0�open_save_window(main_window%,sort_window%) .�403 .3�open_save_window(main_window%,saveas2_window%) .".�set_caret(saveas2_window%,filename_icon%) .,�419 .63�open_save_window(main_window%,saveas3_window%) .@.�set_caret(saveas3_window%,filename_icon%) .J� .^Ȏwindow%� .h4�saveas1_window%,saveas2_window%,saveas3_window% .r'�save_key_press(window%,key%,icon%) .|�main_window% .�Ȏkey%� .��13 .��icon%=ra2m_icon%� .�$�current_record%=no_of_records%� .�no_of_records%+=1 .�<�put_text(main_window%,noingp_icon%,�(no_of_records%+1)) .�� .��forward .�� .� .�ș"Wimp_ProcessKey",key% .�� .��goto_window% / �key%=13� /�close_menu / �goto /&� /0 /:ș"Wimp_ProcessKey",key% /D� /X� /v(��save_key_press(window%,key%,icon%) /��file$,type% /�Ȏkey%� /��13 /�"file$=�get_text(window%,icon%) /��file$,".")� /�Ȏwindow%� /��saveas1_window% /��save_data(file$) /��close_menu /��saveas2_window% 0�save_draw(file$) 0�close_menu 0�saveas3_window% 0 �save_text(file$) 0*�close_menu 04� 0>� 0HM�report_error("To save, drag the icon to a directory display",�,�,false%) 0R� 0\ 0fș"Wimp_ProcessKey",key% 0p� 0�� 0���close_menu 0�ș"Wimp_CreateMenu",,-1 0�� 0���save_request 0��blk%!40=&DFE� 0� �sys_var("Wimp$Scrap")<>""� 0�blk%!36=-1 1"$(blk%+44)="<Wimp$Scrap>"+�(0) 1 blk%!0=64 1@blk%!12=blk%!8:blk%!16=2:ș"Wimp_SendMessage",17,blk%,blk%!4 1$� 1.5�report_error("Wimp$Scrap not found.",�,�,false%) 18G�report_error(app_name$+" needs to have 'seen' !Scrap.",�,�,false%) 1B� 1L� 1`� 1~��load_request 1�!�handle%,i%,eol%,file$,click% 1��blk%!40=&DFE� 1��ask2save� 1�click%=� 1�I�report_error("Loading will wipe current UNsaved data...",�,�,click%) 1�� 1�click%=1 1�� 2 �click%<>1� 2ș"Hourglass_On" 2�wipe_all(�) 22"file$=�get_string(blk%+44,255) 2<handle%=�(file$) 2P"group$=�get_cell(handle%,eol%) 2d eol%=0 2x�i%=0�1 2��j%=0�2 2�3�eol%=0 test%(j%,i%)=�(�get_cell(handle%,eol%)) 2�� 2�� 2��i%=0�max_no_of_records% 2� eol%=0 2�'name$(0,i%)=�get_cell(handle%,eol%) 2�'name$(1,i%)=�get_cell(handle%,eol%) 2��j%=0�2 2�*dob%(j%,i%)=�(�get_cell(handle%,eol%)) 2�� 3Qra%(0,0,i%)=�(�get_cell(handle%,eol%)):ra%(0,1,i%)=�(�get_cell(handle%,eol%)) 3Y�eol%=0 ra%(1,0,i%)=�(�get_cell(handle%,eol%)):ra%(1,1,i%)=�(�get_cell(handle%,eol%)) 33�eol%=2 no_of_records%=i%:i%=max_no_of_records% 3,� 3@ �#handle% 3Tf�file$="<Wimp$Scrap>"�("*DELETE ""<Wimp$Scrap>""")��put_text(saveas1_window%,filename_icon%,file$) 3^8�put_text(saveas2_window%,filename_icon%,"RA�Graph") 3h7�put_text(saveas3_window%,filename_icon%,"RA�Text") 3|blk%!12=blk%!8 3� blk%!16=4 3�'ș"Wimp_SendMessage",17,blk%,blk%!4 3��open_window(main_window%) 3�/�put_text(main_window%,gpname_icon%,group$) 3�<�put_text(main_window%,noingp_icon%,�(no_of_records%+1)) 3�current_record%=0 3�!�load_record(current_record%) 3�5�put_text(main_window%,tst1d_icon%,�(test%(0,0))) 3�5�put_text(main_window%,tst1m_icon%,�(test%(1,0))) 3�5�put_text(main_window%,tst1y_icon%,�(test%(2,0))) 3�5�put_text(main_window%,tst2d_icon%,�(test%(0,1))) 3�5�put_text(main_window%,tst2m_icon%,�(test%(1,1))) 45�put_text(main_window%,tst2y_icon%,�(test%(2,1))) 4ș"Hourglass_Off" 40� 4D� 4bݤget_string(ptr%,length%) 4v �temp$ 4��length%=0 length%=255 4��ptr%=ptr%�ptr%+length%-1 4��?ptr%<32� 4� =temp$ 4�� 4�temp$+=�(?ptr%) 4�� 4�� 4� =temp$ 4���save_demand 5�file$,type% 5 "file$=�get_string(blk%+44,255) 5*'�blk%!36=-1�to_filer%=��to_filer%=� 54type%=blk%!40 5HȎdrag_window%� 5R�saveas1_window% 5\�save_data(file$) 5f@blk%!12=blk%!8:blk%!16=3:ș"Wimp_SendMessage",17,blk%,blk%!4 5p=�to_filer%�put_text(saveas1_window%,filename_icon%,file$) 5z�saveas2_window% 5��save_draw(file$) 5�@blk%!12=blk%!8:blk%!16=3:ș"Wimp_SendMessage",17,blk%,blk%!4 5�=�to_filer%�put_text(saveas2_window%,filename_icon%,file$) 5��saveas3_window% 5��save_text(file$) 5�@blk%!12=blk%!8:blk%!16=3:ș"Wimp_SendMessage",17,blk%,blk%!4 5�=�to_filer%�put_text(saveas3_window%,filename_icon%,file$) 5�� 5�� 5�ݤget_cell(handle%,�eol%) 5��temp$,temp%,cell$ 6��#handle%eol%=2 6;ȕeol%<>2� temp%<>44� temp%<>10� temp%<>13��(cell$)<255 6�temp%<>0 temp$=�(temp%) 6$�temp$=""""temp$="" 6.cell$+=temp$ 68temp%=�#handle% 6B�temp%=10�temp%=13 eol%=1 6L��#handle%� 6V eol%=2 6`�temp%<>0 temp$=�(temp%) 6j�temp$=""""temp$="" 6tcell$+=temp$ 6~� 6�� 6� =cell$ 6���output(handle%,line$) 6��i% 6��line$=""�#handle%,10:� 6��i%=1��(line$) 7 �#handle%,�(�line$,i%,1)) 7� 72�#handle%,10 7F� 7d��save_draw(file$) 7x�error%,click%,i%,append% 7��no_of_records%>30� 7�click%=� 7���report_error("The graph will be more than 1 page long. Is it OK to name the files '"+��leaf(file$),9)+"0', '"+��leaf(file$),9)+"1' etc.",�,�,click%) 7��click%<>1� 7� append%=� 7�� 7� append%=� 7�� 7�ș"Hourglass_On" 7�/group$=�get_text(main_window%,gpname_icon%) 7�!�save_record(current_record%) 85test%(0,0)=�(�get_text(main_window%,tst1d_icon%)) 85test%(1,0)=�(�get_text(main_window%,tst1m_icon%)) 85test%(2,0)=�(�get_text(main_window%,tst1y_icon%)) 8"5test%(0,1)=�(�get_text(main_window%,tst2d_icon%)) 8,5test%(1,1)=�(�get_text(main_window%,tst2m_icon%)) 865test%(2,1)=�(�get_text(main_window%,tst2y_icon%)) 8@�i%=0�no_of_records%�31 8J �append%� 8T?�drawfile_start(�path(file$)+��leaf(file$),9)+�(i%),error%) 8^� 8h!�drawfile_start(file$,error%) 8r� 8| �error%�� 8��fonttable 8� �grid 8��fill(i%*31) 8��drawfile_end 8� �append%� 8�<�("SetType "+�path(file$)+��leaf(file$),9)+�(i%)+" AFF") 8�� 8�"�("SetType "+drawfile$+" AFF") 8�� 8�� 8�ș"Hourglass_Off" 8�� 9 ��grid 90�i%,h%,w%,a$ 9D�group_start 9X�i%=0�31 9bh%=2.75*cm+i%*.75*cm 9l-�path_start(1*cm,h%,1*point,black%,none%) 9v�path_draw(20.25*cm,h%) 9� �path_end 9�� 9��i%=0�6 9�h%=8.25*cm+i%*2*cm 9�.�path_start(h%,26*cm,1*point,black%,none%) 9��path_draw(h%,26.5*cm) 9� �path_end 9�� 9��i%=0�5 9�h%=9.25*cm+i%*2*cm 9�.�path_start(h%,26*cm,1*point,black%,none%) :�path_draw(h%,26.25*cm) : �path_end :� :*�down_line(1*cm,1*point) :4�down_line(4.5*cm,1*point) :>�down_line(6*cm,1*point) :H�down_line(7*cm,1*point) :R�down_line(8*cm,1*point) :\!�down_line(8.25*cm,.25*point) :f"�down_line(10.25*cm,.25*point) :p"�down_line(12.25*cm,.25*point) :z"�down_line(16.25*cm,.25*point) :�"�down_line(18.25*cm,.25*point) :� �down_line(20.25*cm,1*point) :��i%=0�6 :�h%=8.15*cm+i%*2*cm :�?�text(h%,26.75*cm,�(i%-3),12*point,12*point,1,black%,none%) :�� :�e�text(2.25*cm,26.5*cm,"Name D.O.B. R.A.1 R.A.2",11*point,11*point,1,black%,none%) :�� ;��down_line(x%,thick%) ;-�path_start(x%,26*cm,thick%,black%,none%) ;$�path_draw(x%,2.75*cm) ;. �path_end ;8� ;V��init_draw ;`maxlev%=32 ;j"�start%(maxlev%),box%(maxlev%) ;t4�l%(maxlev%),b%(maxlev%),r%(maxlev%),t%(maxlev%) ;~�buf%256 ;�no_of_d_fonts%=2 ;��d_font$(no_of_d_fonts%) ;�d_font$(1)="Trinity.Medium" ;�d_font$(2)="Trinity.Bold" ;�big%=&7FFFFFFF ;�EF=0.552256944 ;�c%=0 ;�inch=&B400 ;� point=640 ;�cm=18140 ;�mm=1814 ;�black%=0 <