home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
progr_ba
/
demo.prg
< prev
next >
Wrap
Text File
|
1992-03-01
|
3KB
|
89 lines
/*----------------------------------------------------------------------------
STATUS version 1.01
(c) 1992 John T. Opincar, Jr.
CID: 71631,541
02/27/92
PLEASE READ THIS!
You are free to distribute STATUS in any manner you choose and use STATUS
in any setting, including commercial without any obligation to me. The
only thing that I ask is that you do not distribute modified versions of
STATUS without including the original code and documentation in its
entirety. If you feel inclined to distribute STATUS with your own
modifications (which I would discourage), ***PLEASE*** keep your changes
in seperate files, and make the seperation and changes obvious to anyone
who might subsequently encounter the ZIP.
I have been informally supporting STATUS on CIS, and do not want a zillion
messages about problems introduced by others. In lieu of making your own
changes, I would prefer that you send me mail describing the additional
features you would like to see in STATUS. The exceptional performance
gains yielded by STATUS are the result of several key assumptions about
how it will be used. Before making a suggestion, please read the section
in the documentation entitled, "What Makes STATUS Tick." The main
motivation behind this version of STATUS was input I received from users.
----------------------------------------------------------------------------*/
local cycle := 0
* begin
@ 0,0 clear
if ( !file('demo.dbf') )
? 'Creating demo.dbf'
dbCreate('demo', { {'FIRST', 'C', 12, 0}, ;
{'MIDDLE', 'C', 1, 0}, ;
{'LAST', 'C', 15, 0}, ;
{'PHONE', 'C', 12, 0}, ;
{'ADDRESS', 'C', 35, 0}, ;
{'CITY', 'C', 15, 0}, ;
{'STATE', 'C', 2, 0}, ;
{'ZIP', 'C', 10, 0} })
endIf
use
use demo
if ( lastRec() < 5000 )
? 'Filling demo.dbf'
while ( lastRec() < 5000 )
dbAppend()
do case
case ( cycle == 0 )
DEMO->FIRST := 'Charles'
DEMO->MIDDLE := 'B'
DEMO->LAST := 'Balogne'
DEMO->PHONE := '(555)555-5555'
DEMO->ADDRESS := '1012 Main Street'
DEMO->CITY := 'Lewisville'
DEMO->STATE := 'ND'
DEMO->ZIP := '40056-1023'
case ( cycle == 1 )
DEMO->FIRST := 'John'
DEMO->MIDDLE := 'K'
DEMO->LAST := 'Salami'
DEMO->PHONE := '(201)555-1234'
DEMO->ADDRESS := '6968 Abuda'
DEMO->CITY := 'Houston'
DEMO->STATE := 'TX'
DEMO->ZIP := '77051'
case ( cycle == 2 )
DEMO->FIRST := 'Marilyn'
DEMO->MIDDLE := 'S'
DEMO->LAST := 'Beefjerky'
DEMO->PHONE := '(514)222-3333'
DEMO->ADDRESS := '4156 Caroline St.'
DEMO->CITY := 'New York'
DEMO->STATE := 'NY'
DEMO->ZIP := '10023-1100'
endCase
cycle := (cycle + 1) % 3
endDo
endIf
use
statusPack('demo', { {'demoname', 'upper(LAST) + upper(FIRST)'}, ;
{'demophon', 'PHONE'}, ;
{'democity', 'upper(CITY)'}, ;
{'demozip', 'ZIP'} })
return