JOYTemplate for Footer group  hX[5kIz k phlI Y%z kZ-KiZ-K N"զI` {x R< N"զI` {x R<L$ЦIz yx UL$ЦIz xx UL$ЦIz x UL$ЦIz ~x UL$ЦIz }x UL$ЦIz |x UL$ЦIz sx UL$ЦIz rx UModern ++Y"ټKۺ[X۹:ѩںRj}[Yq˫˻"wDd9r99̷ܻۛYgͻںۻɫۻʘ٩۫٘ xScript 1: 0x R< P pVARIABLELISTERPROGRAMx xScript 1: 0x R<  &KPage=== :(c)copyright1989byGeoffBuckeridge xScript 1: 0x R<  VARIABLELISTERPROGRAM(cont)x xScript 1: 0x R<  &KPage=== :(c)copyright1989byGeoffBuckeridgex xScript 1: 0x R< )Thepurposeofthisprogramistolistthenamesofallthevariables,usedin yourbasicprogram.Italsoprovidesacrossreferencetoallthelinenumbers  *wherethevariableshaveoccurred.Itsfullpotentialmightnotbeimmediately=obvioussoherearesomeusesitcanbeputto.  'Howmanytimeshaveyougotpartwaythroughdevelopingyourlatest100line  V?program,decidedthatyouneedanewvariable,andcan'tmakeupyourmind  whattocallit.Youcan'tusex%becauseyoualwaysusex%infor/nextloops. Z9$isoutofthequestionbecausethatstheoneyoualwaysuseinanemergencyandthatwasemployedyesterday. 2Therewouldn'tbethisdilemaifyoualwayskeptanoteofthevariablesused /todate,andadescriptionoftheirfunction.Youdon't?Wellnevermind,I'm  surethatfewpeopledo.Theansweristodoaretrospectiveanalysisofyourlprogram,butthiscanbeaverytedioustask.  Theexercise,however,canbeextremelyrewardinginlotsofrespects.Itcan,forexample,highlightsomeofthefollowingproblems. ,a)  Variableswhichwereonlyinsertedtemporarilyandshouldhavebeenremoved. ,b)  Aninconsistancyinthelabellingofvariables.e.g.Onevariablename maybefourletterslongwhenalltheotherstaketheforma5,g9,c2,etc.Thiswillnoteffecttheoperationoftheprogramjustitsreadability.q ,c)  Aninconsistancyinthetypesofvariable.e.g.Somecouldbe  Q&suffixedby%andothersnot,andyettheymightallcontainintegervalues.Againnotadisaster,butnotprettyeither. ,d)  Anewvariablehasbeenusedwhenanold,generalpurposeonecouldjhavebeenreused.  mVThesearejustafewgoodreasonstogothroughyourprogram,afterit's   written,andrationalisetheuseofvariables.SothisiswhereVARLISTcomesh xScript 1: 0x R< intoitsown,andit'squitesimpletouse. %Onethingtonoteisthatthisprogramwillonlylistvariableswhicharetyped inlowercase.Itisalwaysbest,anyway,totypetheentireprograminlower =&case.ThatisexceptthosebitsbetweenquotesorinREMstatements.Then assoonasitislistedthebasickeywordsareconvertedtouppercaseleavingtherestjustasyoutypedit.UVARLIST,onlyworksonfilessavedinASCIIformat.Likeso:LOAD"MYPROGSAVE"MYPROG",AZThentypeSYSTEMtoreturntoCP/Mandattheprompttype:VARLISTMYPROG  xScript 1: 0x R< Aseachnewvariableisfounditisdisplayedonscreen.  Whenalltheprogramhasbeenscannedthevariablesaresortedinto  >'alphanumericorder.Youcan,atthisstage,selectwhetheryouwanttosend  uJthelisttothevduorprinter,andchoosewhichoutputstyleyourequire.Therearetwostyles,andyoucanpickeither,orboth. L5Style1isacompletecrossreference.Itprintsalabelbylistingthevery  firstlineoftheprogram,usuallyaREMstatement.Thenfollowsthreecolumns %containingthevariablename,thenumberoftimesithasbeenusedandalltheElinenumbersonwhichitoccurred. Style2startsinthesamefashionwithalabelthenfourcolumns.Thistimeit  6givesyouthevariablenameandthetotalnumberofoccurances.Butinstead oflistingallthelinenumbers,itonlyprovidesyouwiththefirstlineinwhich # thevariablewasused.Thelastcolumnjustproduceslinesonwhichtowritedescriptions.  Nowifyougetintothehabbitoflistinganddocumentingyourprogramvariables,itwillmakelifeeasierwhenyouneedtorefertothemagain.