Professional Documents
Culture Documents
فيجوال فوكس برو
فيجوال فوكس برو
:
- start - .programs - 0.6 .Microsoft visual foxpro - 0.6.Microsoft visual studio
&
) : ( command window
) (enter )( . :-
&
.execute selection
&
SET COLOR TO W/B CLEAR 02,? I LOVE PROGRAMMING -:CLEAR . -:SET COLOR TO .
:-
code N X B GR BG G
&
I RB R W +GR U
project
project :-
- File .New
&
&
- .Pjx
wizard
wizard form report .query
Wizard
Wizard - New .
&
New . Wizard Next Back / New table - New .Table Cancel .Finish
&
- Wizard .
- .
- .
&
- .
01
&
- .
- Finish Save . )-:(Tables - . Create table - .Update table structure . - .Open table
11
&
Create table
Visual foxpro :-
": :-
- create :- > Create < file name File name .
) (structure .
-: type .
&
-:index ) (. / . .Tab
) (
CHARCTER CURRENCY NUMBER FLOAT DATE DATE TIME DOUBLE INTEGER LOGICAL MEMO GENERAL )CHARACTER(BINARY )MEMO(BINARY
31
&
> <yes :-
41
&
Name No
NO 02 3 5
:- .
:
- . New
51
&
- .save
61
&
- .ok
- .
71
&
- Yes .
Open table
:
:- >Use <file name > <File name . :- .
81
&
:-
- OPEN .FILE
91
&
- OK .
: :-
) ( :- Modify structure . create . :
character numeric .
: :-
- . :-
- :-
02
&
- Ok .Project manager
12
&
22
&
- Modify .
- -: brow :-
32
&
:- command . - -: edit .
- -:delete pack .
42
&
- -:pack delete .
pack assell .
52
&
- -: recall delete :-
62
&
- -:zap no . yes
test ch Getread no . 1+Replace for age =20 age with age age 02= age
1+.age
72
&
) (sorting ).(indexing
- sorting
( .
82
&
- indexing
:- ]Index on [expr] to [index table name -:Expr . -:Index table name idx
:- index expr .
- -:go to go to n n . :-
-:Go bottom .
92
&
- -:locate )( expr for command . -: found ) . .T . (.F . .T . .F :- Locate for expr 01= locate for no .
) ( -: EOF . .T .
) ( -: BOF . .T .
locate
03
&
- -:count :- Count to ct .ct - -:sum numeric sum :- Sum degree degree . - -: average null average :- Average degree .Degree :-
- ) ( -: Calculate sum :-
) Calcu sum ( degree
13
&
- ) ( -:Calculate avg :-
Calcu )avg(degree
.degree
- ) ( -:Calculate cnt
) (Calc cnt . - ) ( -:calculate std :- ) Calcu std ( degree - ) ( -: calculate min :- ) Calcu min( degree -: calculate - ) (max :- Calcu ) max ( degree
Dbase Containers
23
&
33
&
43
&
database
53
&
- :-
63
&
- view .
73
&
- -: one to one .
83
&
:-
93
&
index .no
04
&
yes :-
no 1 table :-
14
&
1 no :-
:-
24
&
:-
- one to many :-
34
&
44
&
ok -:no
54
&
ok 2no 4-:table
:-
64
&
:-
query
. .qpr - . - wizard
- query wizard ok
: wizard
74
&
- no,name,age test .
- :-
84
&
- :
- :
94
&
- :
- finish .qpr
05
&
15
&
- new file
25
&
:-
sql .
creating views
. )( - -: local view . - remote view .
35
&
view new file new file wizard view query update creiteria :
) (view
45
&
next
:-
55
&
. next . no
next .
65
&
next
finish
75
&
view view
new file :-
new file
85
&
test add :-
95
&
view design
1 view . :-
sql .
form
- . wizard
2 .new file
06
&
: wizard
.forms - wizard
: wizard
:
- .
- form wizard ok
- no,name,age test .
16
&
- :
26
&
- :
36
&
- finish .scx
-
- new file .form
46
&
- . new file
:- - form controls :-
. . . .
56
&
. . . . . . . . .
. . ) (.
. .
. . . .
properties Command
66
&
caption :-
76
&
:-
.wizard
86
&
CAPTION FORECOLOR FONTTIME FONTSIZE AUTOSIZE VISIBLE ENABLED TOP LEFT WIDTH HEIGHT NAME TOOLTIPTEXT
) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) (
reports
96
&
view
wizard
- . next
07
&
- .
- .
17
&
27
&
- .
- .
37
&
- finish . frx
open :-
47
&
preview :-
&
)01( Name= space . - -: logica ) ..f .(.t true false .State=.t - -: date ) / / (
arrays
Declare arrayname )(exp . Declare arrayname 2exp1,exp . Declare 2arrayname 1 exp1, arrayname2 exp . Declare )2,5( 2arr1 (12),arr .
67
&
/ :- 000.441=)1(1Arr Arr2(2)=asdf
- if statement
If exp then Commands endif exp commands .endif If exp then Commands Else Commands endif exp commands .else - do case.endcase
do case 1Case exp Commands 2Case exp Commands . Otherwise Commands endcase
77
&
- scan..endscan Scan Commands Loop Exit Endscan :- -:Exit endscan . -:Loop scan . -dowhile..enddo Do while exp Commands Loop Exit Enddo commands exp
. .T . .F :-
-:exit enddo .
87
&
-:Loop do while . - for.endfor for var=initial to final commands exit loop endfor var initial final :- -:exit endfor . -:Loop for .
&
- function
) Function ( function name Return exp exp . return return . .T = :- ) (1Av= func
Ali is found The name is not found 1use stu "locate for name="ali )(if found "?"ali is found else " ?"the name is not endif docase clear
08
&
0=m )01(*n=space " "=*k } / / {=*d @1,1 get m read do case 1=case m "@ 2,1 say"one 2=case m "@ 2,1 say"two 3=case m "@2,1say"three otherwise "@ 2,1 say"no endcase
clea 0=i )4(1declare a 3=)1(1a "a1(2)="abc )(a1(3)=date 3 for i=1 to )?a1(i Endfor )(
18
&
clea )2,3(DIMENSION gaArray 'gaArray(1,1) = 'G )1,1(? gaArray 'gaArray(1,2) = 'A )2,1(?gaArray 'gaArray(1,3) = 'C )3,1(?gaArray dowhile 1use stu .do while .T ) (if eof exit endif ?no ?name skip enddo
scan USE stu1 && Opens stu table CLEAR 02<SCAN FOR no ? no,name ENDSCAN for
28
&
clea 1use stu 5 FOR n=1 TO ? no,name skip ENDFOR procedure clea 1use stu 03,02 do test with proc test parameters n,m 0=d d=n+m ?d Retu
function
38
&
48