home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
GENERAL
/
USDA_NDB.ZIP
/
USDA.PRG
< prev
next >
Wrap
Text File
|
1991-11-17
|
2KB
|
85 lines
* Program..: USDA Nutrient Database display program for CLIPPER Compiler
* created to display the data found on CRS BBS uploaded by others.
* Don't blame me if you get fat cause the data is wrong. I just wrote
* the display program, not the data.
* Author...: DAVE SAGE
* Date.....: 11/17/91
* Notice...: Copyright (c) 1991, DAVE SAGE, All Rights Reserved
* Notes....:
* ok so it could use some improvement. What do you want for a Sunday
* afternoon?
SET TALK OFF
SET BELL OFF
SET STATUS OFF
SET SCOREBOARD OFF
SET ESCAPE ON
SET CONFIRM ON
SET COLOR TO GR+/b,GR+/b,B,B
IF .NOT. FILE("USDADESC.NTX")
CLEAR
@15,0 SAY "Standby..... Creating missing Index file. This could take a while"
USE USDA
INDEX ON DESC TO USDADESC
CLEAR
else
USE USDA INDEX USDADESC
endif
GO TOP
SET PROCEDURE TO USDAPROC
some_more = "J"
DO while .T.
DO CASE
CASE some_more = "N"
SKIP
IF EOF()
GO TOP
ENDIF
CASE some_more = "P"
* wrap around to bottom if at the top
SKIP -1
IF BOF()
GO BOTTOM
ENDIF
CASE some_more = "J"
CLEAR
store ' ' to describe
@11,5 SAY " (or the first few letters will do)"
@10,0 SAY "Enter a food to search for (RETURN to exit) ====> " GET describe PICTURE "@!XXXXXXXXXXXXXXXXXXXX"
READ
if describe = " "
some_more = "X"
found_it = .F.
endif
if some_more = "J"
store rtrim(describe) to describe
found_it = .T.
SEEK describe
if .NOT. FOUND()
CLEAR
@10,0 SAY "Sorry nothing close to that on file"
@11,0 SAY ""
wait
go top
found_it = .F.
endif
endif
ENDCASE
if .NOT. EOF() .AND. found_it
do showone
do askmore
endif
if some_more = "X"
clear
close all
exit
endif
ENDDO T
RETURN