home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
database
/
vpi1_303.arj
/
VECTOR.PRG
< prev
next >
Wrap
Text File
|
1991-12-30
|
7KB
|
198 lines
******************************************************************
** VECTOR.PRG
** (C) Copyright 1990-92, Sub Rosa Publishing Inc.
**
** A demonstration program provided to VP-Info users.
** This program may be copied freely. If it is used in commercial code,
** please credit the source, Sub Rosa Publishing Inc.
**
** VECTOR is compatible with all current versions of VP-Info.
**
** VECTOR.prg demonstration of correct use of data files put
** into use with macros, combined with referencing
** its fields by vector referencing. Note: a data
** file must be placed into use (normally with the
** COMPILE keyword) before the USE macro command.
** Also uses screen-switching techniques for fun.
**
** Sid Bursten and Bernie Melman
******************************************************************
* Data file: MATRIX.DBF
* Number of records: 0
* File number: #1
* Field Name Type Width Dec
* 1 FLD1 C 1
* 2 FLD2 C 1
* 3 FLD3 C 1
* 4 FLD4 C 1
* 5 FLD5 C 1
* 6 FLD6 C 1
* 7 FLD7 C 1
* 8 FLD8 C 1
* 9 FLD9 C 1
* 10 FLD10 C 1
* 11 FLD11 C 1
* 12 FLD12 C 1
* 13 FLD13 C 1
* 14 FLD14 C 1
* 15 FLD15 C 1
* 16 FLD16 C 1
* 17 FLD17 C 1
* 18 FLD18 C 1
* 19 FLD19 C 1
* 20 FLD20 C 1
* 21 FLD21 C 1
* 22 FLD22 C 1
* 23 FLD23 C 1
* 24 FLD24 C 1
* 25 FLD25 C 1
* 26 FLD26 C 1
* 27 FLD27 C 1
* 28 FLD28 C 1
* 29 FLD29 C 1
* 30 FLD30 C 1
* 31 FLD31 C 1
* 32 FLD32 C 1
* 33 FLD33 C 1
* 34 FLD34 C 1
* 35 FLD35 C 1
* 36 FLD36 C 1
* 37 FLD37 C 1
* 38 FLD38 C 1
* 39 FLD39 C 1
* 40 FLD40 C 1
* 41 FLD41 C 1
* 42 FLD42 C 1
* 43 FLD43 C 1
* 44 FLD44 C 1
* 45 FLD45 C 1
* 46 FLD46 C 1
* 47 FLD47 C 1
* 48 FLD48 C 1
* 49 FLD49 C 1
* 50 FLD50 C 1
* 51 FLD51 C 1
* 52 FLD52 C 1
* 53 FLD53 C 1
* 54 FLD54 C 1
* 55 FLD55 C 1
* 56 FLD56 C 1
* 57 FLD57 C 1
* 58 FLD58 C 1
* 59 FLD59 C 1
* 60 FLD60 C 1
* 61 FLD61 C 1
* 62 FLD62 C 1
* 63 FLD63 C 1
* 64 FLD64 C 1
* 65 FLD65 C 1
* 66 FLD66 C 1
* 67 FLD67 C 1
* 68 FLD68 C 1
* 69 FLD69 C 1
* 70 FLD70 C 1
* 71 FLD71 C 1
* 72 FLD72 C 1
* 73 FLD73 C 1
* 74 FLD74 C 1
* 75 FLD75 C 1
* 76 FLD76 C 1
* 77 FLD77 C 1
* 78 FLD78 C 1
* 79 FLD79 C 1
* 80 FLD80 C 1
* 81 FLD81 C 1
* 82 FLD82 C 1
* 83 FLD83 C 1
* 84 FLD84 C 1
* 85 FLD85 C 1
* 86 FLD86 C 1
* 87 FLD87 C 1
* 88 FLD88 C 1
* 89 FLD89 C 1
* 90 FLD90 C 1
* 91 FLD91 C 1
* 92 FLD92 C 1
* 93 FLD93 C 1
* 94 FLD94 C 1
* 95 FLD95 C 1
* 96 FLD96 C 1
* 97 FLD97 C 1
* 98 FLD98 C 1
* 99 FLD99 C 1
* 100 FLD100 C 1
* 101 FLD101 C 1
* 102 FLD102 C 1
* 103 FLD103 C 1
* 104 FLD104 C 1
* 105 FLD105 C 1
* 106 FLD106 C 1
* 107 FLD107 C 1
* 108 FLD108 C 1
* 109 FLD109 C 1
* 110 FLD110 C 1
* 111 FLD111 C 1
* 112 FLD112 C 1
* 113 FLD113 C 1
* 114 FLD114 C 1
* 115 FLD115 C 1
* 116 FLD116 C 1
* 117 FLD117 C 1
* 118 FLD118 C 1
* 119 FLD119 C 1
* 120 FLD120 C 1
* 121 FLD121 C 1
* 122 FLD122 C 1
* 123 FLD123 C 1
* 124 FLD124 C 1
* 125 FLD125 C 1
* 126 FLD126 C 1
* 127 FLD127 C 1
* 128 FLD128 C 1
* ** Record Length ** 129
*
CLS
TEXT
VECTOR.prg demonstration of correct use of data files put
into use with macros, combined with referencing
its fields by vector referencing. Note: a data
file must be placed into use (normally with the
COMPILE keyword) before the USE macro command.
Also uses screen-switching techniques for fun.
ENDTEXT
?
DIR *.dbf
blanks=replace(blank(11),' ','.')
USE matrix compile
CURSOR 22,0
ACCEPT "Enter file name... " to fil_nam
CLS
USE &fil_nam
SCREEN 1,2
SCREEN 2
DO WHILE .not. eof
CURSOR 0,20
?? 'Record',ltrim(str(#,8)),'of',ltrim(str(dbf(recs),8)),'records'
REPEAT dbf(fld) times varying fnum
fld_name=insert(blanks,trim(fld(name,fnum)),1)
? fld_name,matrix[fnum]
IF fnum=dbf(fld) .or. row()>20
@ 24,40 say 'Press spacebar to continue...'
SCREEN 2,1
SCREEN 1
CURSOR 24,75
ok=inkey()
SCREEN 2
CLS
ENDIF
ENDREPEAT
SKIP
ENDDO
SCREEN 1
@ 24,0
CURSOR 23,0
WAIT
CHAIN samples
*
* *** end of program VECTOR.PRG ***