home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbadvan.zip
/
SCROLL.PRG
< prev
next >
Wrap
Text File
|
1987-02-14
|
2KB
|
68 lines
* scroll.prg this program creates a database file from
* a command file to permit editing
SET talk OFF
COUNT TO numrec
STORE 1 TO linenum
STORE ' ' TO muser
STORE t TO menu
ERASE
DO WHILE menu
@ 23,1 SAY "A=LIST ALL. B=BACKWARD LIST. F=FORWARD LIST. X=QUIT " ;
GET muser PICTURE '!'
READ
IF muser = 'X'
STORE f TO menu
ENDIF muser = 'X'
DO CASE
CASE muser = 'A'
STORE 1 TO linenum
ERASE
GO TOP
STORE 1 TO mptr
DO WHILE .not. eof
STORE line TO dline
? #, " " ,trim(dline)
*advance to next record
SKIP
STORE linenum +1 TO linenum
ENDDO WHILE .not. eof
?
CASE muser = 'B'
IF linenum<23
STORE 21 +linenum TO scroll
ELSE
IF #=numrec
STORE 43 TO scroll
ELSE
STORE 44 TO scroll
ENDIF #=numrec
ENDIF linenum<23
STORE 1 TO linenum
STORE # TO recnum
STORE recnum-scroll TO recnum
IF recnum <1
STORE 1 TO recnum
ENDIF recnum <1
ERASE
GOTO RECORD recnum
DO WHILE linenum <23 .AND. .not. eof
STORE line TO dline
? #, " " ,trim(dline)
SKIP
STORE linenum +1 TO linenum
ENDDO WHILE linenum <23 .AND. .not. eof
CASE muser = "F"
ERASE
STORE 1 TO linenum
DO WHILE linenum <23 .AND..not.eof
STORE line TO dline
? #, " " ,trim(dline)
SKIP
IF .not.eof
STORE linenum +1 TO linenum
ENDIF .not.eof
ENDDO WHILE linenum <23 .AND..not.eof
ENDCASE
ENDDO WHILE menu
SET talk ON