Douglas, Thanks for the encouraging words! I do believe that this version should work on a 512K machine (I tried it with NoFastMem). If for some reason it doesn't just lower the numbers in the BOWLING-STATS.LOADER file. (THIS LINE: CLEAR, 123000, 15000:REM *** Bunches of memory!). If you still have trouble let me know. This version (1.5) has no known bugs and I've been using it for my league all season (and earlier versions). Yes, it's slow, but try to do what it does by hand! PS- The only thing I want for this is feedback if something doesn't seem to work. Later.. Allen ---------------------------------------------------------------------- Documentation for BOWLING-STATS From Allen Maroney (GEnie: A.MARONEY) Version 1.5 The BOWLING-STATS program was written for my use and I therefore make no warranty, or promise that it will do anything useful for you. Use this program at your own risk. If you find a bug, don't bother me until you fix it (just kidding). I attempted to make this program as generic as possible and if you were to change the OPEN commands and add anout 200K this should even work on a C64. ---------------------------------------------------------------------- To really make this program useful you need four files (plus any icons). The first of which is BOWLING-STATS.DOC. Since you're reading it I'll assume you have it. Second is the BOWLING-STATS.LOADER program. All this does is open up plenty of memory so that the next program can do it's thing. Oh ya, it loads the main program and runs it. Third is the BOWLING-STATS program. This was written in basic (I can hear the groans [42 GoTo statements!]) and does the job of processing and formatting data with reasonable amount of speed. This makes HEAVY use of arrays and uses arrays to point to other arrays. The code has enough comments in it to make changes possible. The data file is read twice, first to figure out how big to make the arrays (a period will print on the screen for every team just to let you know everything's working), second to process the data. The program should not have to be modified and will adjust for the number of bowlers per team each league allows (each team must be the same). The output goes to screen, printer and a disk text file (printer and/or text file are optional). Any << WARNING >> message will stop the program. Warning messages are to let you know that something is messed up. Like a score > 300 or if the program gets out of synch with the data file. The warning statement will be followed by a brief message letting you know what's up. The final file, BOWLING-STATS.DATA, is, as most files of this nature are, a text file. This should be the only file you need to mess with. It is divided into three parts. (Rename the file BOWLING-BLANK.DATA to BOWLING-STATS.DATA to get you started.) NOTE 1-- The more weeks you hane the longer the program will take to run. NOTE 2-- Every time you run the program every week is refigured from scratch. So if you are into week 6 and you notice a wrong score in week 2 just change it. All of the future output will be updated the next time you run the program. PART ONE First is the header information. This lets the main program know the league name, secretaries name, lane name, starting date and time, handicap percent, total number of weeks in this half of the season and output mode. League name through starting date and time are just text and as long as there is at least a space after the comma everything should be okay. The handicap percent (100 if none) is used to figure handicap scores. If the percent was 80 the and your average is 140 the formula would look like this: (200-140)*.80 Add the result to your score and you have the handicap score. Next is the total number of weeks in this half. If the season isn't divided into two halfs just think of this as the total number of games in the season. Last is the output modes. Everything always goes to the screen. Enter a 'P' (no quotes) here and it goes to the printer. Add an 'F' and it goes to a disk file. A space, 'P', 'F', or 'PF' may be present in caps or lower case and the order and other characters don't matter. If an 'F' is present the file name will be the first ten characters of the league name or until it finds a space or underscore, this is followed by the number of the current week followed by ".TXT". If you just finished week six and your league name was "FLOPPY LEAGUE" the file name would be "FLOPPY-05.TXT". This is handy if you might want to look back at old averages or add a message to the end before posting. Part one looks like this: League Name =, TIMES SUMMER Secretary =, ALLEN MARONEY Lane Name =, TROPICANA LANES Starting Day & Time =, WED 12:30 PM Handicap Percent =, 85 Total # of Weeks in half =, 10 Output Modes (PF) =, PF PART TWO This is where the alternates are kept. An alternate is anyone who is not on a team but fills in for absent bowlers. The first alternate MUST begin four lines below the output modes line. Alternates must begin with a two number prefix - alternate one would be 01, alternate eleven would be 11, etc. This is followed by a space. The program doesn't use these three characters, but it does strip them off. They are for the person entering data because you will need to know the alternate number later. Following the space is the alternate's name and this must be at least seven characters (first+space+last=>7), don't ask why. the name is followed by a comma and then the scores. Scores are enters DOWN for the three games in a series followed by a comma. Leading spaces and tabs don't matter. There MUST be enough zeros to fill up all weeks of all team members before the program is run. The scores are the same for alternates and team bowlers except alternates cannot use other alternates or be absent. If a alternate is absent just enter "000" (no quotes). You may add more alternate bowlers (up to 99) at any time, but I recommend that you don't delete any. An example of two alternates on their third week of a ten week league would look like this: ALTERNATES, WK1 WK2 WK3 WK4 WK5 WK6 WK7 WK8 WK9 WK10 01 JIM PINKILLER, 155, 95, 143, 000, 000, 000, 000, 000, 000, 000 012345,015, 112, 238, 127, 000, 000, 000, 000, 000, 000, 000 143, 144, 165, 000, 000, 000, 000, 000, 000, 000 02 *CINDY GUTTERCLEANER, 197, 179, 186, 000, 000, 000, 000, 000, 000, 000 067890,013, 105, 188, 154, 000, 000, 000, 000, 000, 000, 000 143, 194, 159, 000, 000, 000, 000, 000, 000, 000 Notice that there are two numbers below the bowler's name. The first number (012345) is the total pin count for the first half of the league, if the league is divided in two parts. The second number (015) is the number of games bowled the first half. If your league has is not divided into halfs just enter zeros. Notice also that " 000," are filling up all of the weeks not used yet. And finally look at the "*" before CINDY'S name. ALL women bowlers MUST have an "*" IMMEDIATELY before their names. One blank line separates alternates. PART THREE Following the alternates are the teams. The team name MUST be prefixed with a "|" (no quotes) and team bowlers MUST be prefixed with a "+" (again, no quotes). This is so that if things get out of synchronization the program can let you know gracefully. The team names are followed by a comma and the number of games WON last half then another comma and then the number of games LOST last half. If there is no last half just enter zeros. The bowlers are setup exactly like the alternates, but with two extra options. There is NO blank line between the team name and the first bowler of that team. This all sounds worse than it is, just use the BOWLING-STATS.DATA file as a template. If a team member is absent and an alternate bowled for them DO NOT enter the alternate's score, instead enter a - (minus) followed by the alternate number. (-2 would be alternate #2). The scores will be substituted from the correct alternate from the same week. This will not affect the absent team member's statistics. Each time a bowler's score is substituted an "S" will print on the screen after their name. If a team member is absent and no one bowls for them enter an "A". The program will substitute the last average minus 10 pins for total team pin count without affecting the absent team member's statistics. If a team mamber is absent BEFORE they have an average a blind score of 130 and a blind handicap of 56 will be substituted. If you should have a need to change these blind defaults they are located close to the beginning of the main program and are called BLINDSCORE and BLINDHCP. Any substitute or absent scores are only used for the team scores and they will not affect the individual's average or handicap. Each time a bowler's score is calculated as absent an "A" will print on the screen after their name. If the Absent is a blind score an "Ab" will print after their name. Below each team (all three members in the example below) is the number of games WON. It is assumed that each series consists of three actual games plus one game to the team with high pin count. An example of two teams on their third week of a ten week league would look like this: NAMES WK1 WK2 WK3 WK4 WK5 WK6 WK7 WK8 WK9 WK10 |THUMB HOLES,00,00 +MR. HOLY ROLLER, 165, 145, 129, 000, 000, 000, 000, 000, 000, 000 000000,00, 176, 188, 136, 000, 000, 000, 000, 000, 000, 000 113, 154, 123, 000, 000, 000, 000, 000, 000, 000 +*MRS. ROLLER, 87, A, 174, 000, 000, 000, 000, 000, 000, 000 000000,00, 176, A, 158, 000, 000, 000, 000, 000, 000, 000 93, A, 148, 000, 000, 000, 000, 000, 000, 000 +TOM DRUNK, 34, 102, -3, 000, 000, 000, 000, 000, 000, 000 000000,00, 73, 65, -3, 000, 000, 000, 000, 000, 000, 000 86, 67, -3, 000, 000, 000, 000, 000, 000, 000 --- --- --- --- --- --- --- --- --- --- GAMES WON THIS HALF, 1, 0, 1.5, 0, 0, 0, 0, 0, 0, 0 |GUTTER DWELLERS,00,00 +TOM SMITH, 165, 145, 128, 000, 000, 000, 000, 000, 000, 000 000000,00, 176, 188, 136, 000, 000, 000, 000, 000, 000, 000 143, 152, 143, 000, 000, 000, 000, 000, 000, 000 +*DORIS SMITH, 187, 169, 164, 000, 000, 000, 000, 000, 000, 000 000000,00, 175, 188, 158, 000, 000, 000, 000, 000, 000, 000 143, 153, 148, 000, 000, 000, 000, 000, 000, 000 +HARRY SMITH, 34, -1, -2, 000, 000, 000, 000, 000, 000, 000 000000,00, 73, -1, -2, 000, 000, 000, 000, 000, 000, 000 49, -1, -2, 000, 000, 000, 000, 000, 000, 000 --- --- --- --- --- --- --- --- --- --- GAMES WON THIS HALF, 1, 0, 1.5, 0, 0, 0, 0, 0, 0, 0 Unless you really feel suicidial stop here. The next part shows what the arrays in the MAIN program do. After the first four dimentional array I gave up trying to keep track of them in my head. If this is anything like C I'll stick to basic! ARRAYS IN BOWLING-STATS.MAIN PROGRAM ------------------------------------ Array 1: BNames$(#BOWLERS,2) (Names for ALL bowlers) BNames$([3], 2 ) = Bowler Number 3 BNames$( 3 ,[2]) = Team Name (1=Bowler's Name) ********************************************************************** Array 2: BStats(#BOWLERS,17) (Individual Bowlers statistics) 1- Male (1) or Female (2) 2- Average 3- Current Week's Series 4- Games Bowled 5- Total Pin Count 6- High Score Game (HSG) 7- High Score Series (HSS) 8- High Handicapped Game (HHG) 9- High Handicapped Series (HHS) 10- Handicap (HC) 11- How Many Games Over 200 12- How Many Series Over 500 13- How Many Series Over 600 14- Total Pin Count LAST HALF 15- Total Games LAST HALF 16- First series handicap 17- first week this bowler bowled ********************************************************************** Array 3: TStats(#TEAMS,12) 1- Games Won 7- High Score Game (HSG) 2- Games Lost 8- High Score Series (HSS) 3- Season Won 9- High Handicapped Game (HHG) 4- Season Lost 10- High Handicapped Series (HHS) 5- Number of Games (always 15) 11- Games Won LAST HALF 6- Total Pins 12- Games Lost LAST HALF ********************************************************************** Array 4: Leaders(2,4,4,2) (Mens' and Womens' leaders) Leaders([2], 1 , 3 , 2 ) = Womens Leaders( 2 ,[1], 3 , 2 ) = Scratch Series Leaders( 2 , 1 ,[3], 1 ) = 230 (Third Place High Score) Leaders( 2 , 1 , 3 ,[2]) = 12 (Points to the name of bowler #12 in Array BowlerNames$(12) ) Where Leaders(A,B,C,D) A------------ B---------------- C------------- D------------------ 1- Mens 1- Scratch Series 1- First Place 1- Score 2- Womens 2- Scratch Game 2- Second Place 2- Pointer to Name 3- Handicap Series 3- Third Place 4- Handicap Game 4- Fourth Place ********************************************************************** Array 5: LWIndiv(2,6,2,2) (Last Week's Individual Highlights) LWIndiv([1], 5 , 2 , 2 ) = Men LWIndiv( 1 ,[5], 2 , 2 ) = Handicap Game LWIndiv( 1 , 5 ,[2], 2 ) = Second Place High Score LWIndiv( 1 , 5 , 2 ,[2]) = Points to the name of bowler #12 in Array BowlerNames$ Where LWIndiv(A,B,C) A-------------- B------------- C-------------- D---------------- 1- Men 1- Series 1- First Place 1- Score 2- Women 2- HCP Series 2- Second Place 2- Pointer to Name 3- Pins > Avg Series 4- Game 5- HCP Game 6- Pins > Avg Game ********************************************************************** Array 6: LWTeam(#TEAMS,3) (Last Week's Team Results) 1- Games Won 2- Games Lost 3- Pins ********************************************************************** Array 7: TempScore(#TeamMembers,#WEEKS,3,2,2) (Holds entire team for processing) TempScore([2], 5 , 1 , 1 , 2 ) = Team Member (1-?) TempScore( 2 ,[5], 1 , 1 , 2 ) = Week Number (1-?) TempScore( 2 , 5 ,[1], 1 , 2 ) = Game Number (1-3) TempScore( 2 , 5 , 1 ,[1], 2 ) = 1 is normal score 2 is handicap score TempScore( 2 , 5 , 1 , 1 ,[2]) = 1 is score 2 is pointer to bowler number ********************************************************************** Array 8: AltScores(#ALTS,#WEEKS,3,2) (Holds ALL Alternates for processing) AltScores([7], 14 , 3 , 2 ) = Alternate Number (1-?) AltScores( 2 ,[14], 3 , 2 ) = Week Number (1-?) AltScores( 2 , 14 ,[3], 2 ) = Game Number (1-3) AltScores( 2 , 14 , 3 ,[2]) = 1 is score 2 is pointer to bowler ********************************************************************** Array 9: TeamPos(Team#,3) (Holds team position) 1- Team Wins 2- Total Pin Count 3- Pointer to team name in BNames$ array ###################################################################### That's all for now!