Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : BSDS_SRC.ZIP
Filename : BBADD.PRG

 
Output of file : BBADD.PRG contained in archive : BSDS_SRC.ZIP
* addbat.prg
* add batter

store ' ' to fname
store ' ' to lname
store ' ' to tcode
store ' ' to bcode
store ' ' to pcode
store ' ' to addcode

do while addcode <> 'Q'
clear
use bball index yeardex,namedex
append blank

if addcode = 'C'
replace fstname with fname
replace lstname with lname
replace team with tcode
replace bats with bcode
replace pos with pcode
endif

set format to bb.fmt
read

* UPCASE TEXT LINES

REPLACE LSTNAME WITH UPPER(LSTNAME)
REPLACE FSTNAME WITH UPPER(FSTNAME)
REPLACE TEAM WITH UPPER(TEAM)
REPLACE BATS WITH UPPER(BATS)
REPLACE POS WITH UPPER(POS)

* STORE TEXT TO VARIABLES FOR CARRY FORWARD

store fstname to fname
store lstname to lname
store team to tcode
store bats to bcode
store pos to pcode

set format to

store 0 to batavg
store 0 to slugavg

if hits > 0 .and. ab > 0
replace batavg with (hits/ab)
store (2*doubles)+(3*triples)+(4*hrs) to tbs
store doubles+triples+hrs to extrabases
store hits-extrabases to singles
store ((singles+tbs)/ab)*1000 to slug
replace slugavg with (slug/1000)
endif

@ 7,0 say space(70)

@ 9, 0 say ' Batting Average: '
?? batavg

@ 10,0 say 'Slugging Average: '
?? slugavg

@ 14,0,22,79 box frames1t2
@ 15,2 say 'Press E to EDIT record shown above'
@ 16,2 say ' C to SAVE and CARRY Name forward to next record'
@ 17,2 say ' N to SAVE and add NEW player '
@ 18,2 say ' D to DELETE this record and QUIT to main menu'
@ 19,2 say ' Q to SAVE this record and QUIT to main menu'
@ 21,2 say 'Choice: ' get addcode
read
store upper(addcode) to addcode

if addcode = 'D'
delete
menucode = 8
return
endif

if addcode = 'Q'
menucode = 8
return
endif

if addcode = 'E'
clear
set format to bb.fmt
read
if hits > 0 .and. ab > 0
replace batavg with (hits/ab)
store (2*doubles)+(3*triples)+(4*hrs) to tbs
store doubles+triples+hrs to extrabases
store hits-extrabases to singles
store ((singles+tbs)/ab)*1000 to slug
replace slugavg with (slug/1000)
endif
set format to
endif

enddo
clear
menucode = 8
return


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : BSDS_SRC.ZIP
Filename : BBADD.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/