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

 
Output of file : EXAMPLE.PRG contained in archive : GOFER002.ZIP
* Program.:example.prg
* Author..:Fred C. Wampler
* Date....:01/25/91
* Notice..:Copyright, 1991, Fred C. Wampler
* Notes...:Example using gofer.prg
CLOSE DATA
SELE 0
USE cardfile
IF ! (FILE('author.idx').AND.FILE('magazine.idx').AND.;
FILE('title.idx'))
INDEX ON UPPER(author) TO author
INDEX ON UPPER(magazine) TO magazine
INDEX ON UPPER(TITLE) TO TITLE
ENDIF
SET INDEX TO author,magazine,TITLE
LOCATE FOR UPPER(TITLE)=[GOFER]
DEFINE WINDOW big FROM 0,0 TO 24,79 TITLE [ Gofer Manual ] SYSTEM
DEFINE WINDOW ofmemo FROM 18,0 TO 24,79
SET WINDOW of MEMO TO ofmemo
DEFINE WINDOW getdata FROM 1,0 TO 15,30 TITLE [ Example ] SHAD
ACTI WINDOW getdata
F1=[ON KEY LABEL F1 DO gfrhelp WITH wontop()='GETDATA']
&F1
ON KEY LABEL f2 DO getbook WITH ;
WONTOP()='GETDATA',1,UPPER(author),[author,id:3:r,magazine,title:20]
ON KEY LABEL f3 DO getbook WITH ;
WONTOP()='GETDATA',3,UPPER(TITLE),[title:23,author:10,id:3:r,magazine]
ON KEY LABEL f4 DO getbook WITH ;
WONTOP()='GETDATA',2,UPPER(magazine),;

[magazine:10,title:23,author:10,id:3:r]
CLEAR
@ 0,0 SAY [F1=HELP]
@ 1,0 SAY [F2-Lookup Bookid by author]
@ 2,0 SAY [F3-By Title]
@ 3,0 SAY [F4-By magazine]
@ 4,0 SAY [Esc to exit]
mid=SPACE(3)
@ 10,0 SAY [BOOK ID ] GET mid
READ
ON KEY LABEL f2
ON KEY LABEL f3
ON KEY LABEL f4
ON KEY LABEL f5
SET WINDOW of MEMO TO
CLEAR WINDOW
CLOSE MEMO txt
CLOSE DATA
RETURN

PROCEDURE getbook
PARA ok,neworder,newkey,viewfld
IF !m.ok
RETURN []
ENDIF
KEY=newkey
alias=[cardfile]
norder =neworder
loval=[]
hival=[]
subset=!EMPTY(loval+hival)
ok2edit=1
keydelay=.45
coord=[1,31,17,79] && BROWSE WINDOW coordinates
TITLE=[ Select Book ] && TITLE of BROWSE WINDOW
FIELDS=viewfld
F1=IIF(TYPE([F1])#[C],[on key label F1],F1) && SAVE hotkey STATUS
F5=IIF(TYPE([F5])#[C],[on key label F5],F5) && SAVE hotkey STATUS
msgclr=scheme(2,5) && COLOR of HELP ON TOP line (0)
hlpclr=scheme(2) && COLOR HELP SCREEN (F1)
brwclr=scheme(10) && COLOR of BROWSE WINDOW
edtclr=scheme(7) && COLOR of EDIT WINDOW (^L)
wrdclr=scheme(7) && COLOR of word EDIT
genpara=[NOEDIT NOAPPEND NODELE KEY loval,hival WIDTH 16 TIMEOUT 600]
MODI MEMO txt NOWAIT
IF gofer(&coord) && .OR. golfer(1,40,23,79)
mid=cardfile.id
ELSE
??CHR(7)
WAIT [ID not selected] WINDOW TIMEOUT .5 && returns false IF ESCAPED
ENDIF

PROCEDURE gfrhelp
PARA ok
IF !m.ok
RETURN
ENDIF
lastrec=RECNO()
LOCATE FOR UPPER(TITLE)=[GOFER]
MODI MEMO txt WINDOW big NOEDIT
GO lastrec
RETURN


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : GOFER002.ZIP
Filename : EXAMPLE.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/