Download as pdf or txt
Download as pdf or txt
You are on page 1of 84

&

:
- start - .programs - 0.6 .Microsoft visual foxpro - 0.6.Microsoft visual studio

&

Close this screen .Command window

) : ( command window
) (enter )( . :-

&

hello :- 02,"? "I LOVE PRORAMMING ) ( .

.execute selection

&

SET COLOR TO W/B CLEAR 02,? I LOVE PROGRAMMING -:CLEAR . -:SET COLOR TO .

:-

color Black Blank Blue Brown Cyan Green


4

code N X B GR BG G

&

Inverse Magenta Red White Yello Underlined

I RB R W +GR U

project
project :-

- File .New

&

- project . New file

- save Project manager .

&

- .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 .

:- -:name . -: width . -:decimal .


21

-: type .

&

-:index ) (. / . .Tab

) (

CHARCTER CURRENCY NUMBER FLOAT DATE DATE TIME DOUBLE INTEGER LOGICAL MEMO GENERAL )CHARACTER(BINARY )MEMO(BINARY

31

&

> <insert >. <delete >.<cancel> <ok ><insert > <delete . . ok

> <insert Ctrl+I > <delete Ctrl+D . Ok :-

> <yes :-

41

&

Name No

NAME nada ahmed Muna

NO 02 3 5

:- .

:
- . New

51

&

- table . New file

- .save

61

&

- .ok

- .

71

&

- Yes .

Open table

:
:- >Use <file name > <File name . :- .
81

&

:-

- OPEN .FILE

- LOOK IN FILE NAME .FILES OF TYPE

91

&

- OK .

Update table structure

: :-
) ( :- Modify structure . create . :

character numeric .

: :-
- . :-

- :-

02

&

- Ok .Project manager

- + Data Free tables . add - .

12

&

- Ok Stu1.dbf Free tables :-

22

&

- Modify .


- -: brow :-

32

&

:- command . - -: edit .


- -:delete pack .

42

&

- -:pack delete .

:- delete pack go :- Go record number

pack assell .

52

&

- -: recall delete :-

:- delete recall all :-

62

&

- -:zap no . yes

- -:replace :- Use test 0=Ch @ 1,1 get ch Read Replace no with ch

test ch Getread no . 1+Replace for age =20 age with age age 02= age

1+.age

72

&


) (sorting ).(indexing

- sorting

: ]Sort to [table name ] on [expr table name )

( .

Expr . :- sort . use : test Sort to 1test on state+company

1 test . sort test browse:- 1Use test Browse

82

&

- indexing

:- ]Index on [expr] to [index table name -:Expr . -:Index table name idx

sort idx browse . set index to

:- index expr .


- -:go to go to n n . :-

-:Go top . -: Skip n .skip n

-:Go bottom .

92

&

- -:locate )( expr for command . -: found ) . .T . (.F . .T . .F :- Locate for expr 01= locate for no .

) ( -: EOF . .T .

) ( -: BOF . .T .

continue locate . continue locate continue . - -: seek seek expr expr .

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

:- wizard .new wizard

Dbase Containers

- new file data base new file

23

&

- new file dbc .save

33

&

- database designer one to one .One to many

43

&

database designer view . )(

database

new file new wizard new file

53

&

- :-

63

&

- -:remove - -:delete . - -: cancel .

data base containers


- .

- view .

73

&

. -:key . -: primary key :- - . - null ) (. :- .

- -: one to one .

83

&

/ :- 22 44 11 33 55 V.B ACESS FOXPRO BASIC PASCAL

:-

93

&

index .no

indexes primary key . ok

04

&

yes :-

no 1 table :-

1 no 2 table indexes primary :-

14

&

1 no :-

:-

24

&

:-

- one to many :-

34

&

index no indexes -: primary

44

&

ok -:no

4 table index indexes .regular

54

&

ok 2no 4-:table

:-

64

&

:-

query

. .qpr - . - wizard

- query wizard ok

: wizard

74

&

- no,name,age test .

- :-

84

&

- :

- :

94

&

- :

- finish .qpr

05

&

query open file .Run query

- new file .query

15

&

- new file

add table or view test . -

25

&

. run query query design

:-

sql .

creating views
. )( - -: local view . - remote view .
35

&

view new file new file wizard view query update creiteria :

) (view

- -:table . - -:reset key - -:update all . .

- -:send sql updates . - -:field name . - -:sql where clause includes .

45

&

- -:update using . wizard test .

next

:-

55

&

. next . no

next .

65

&

next

finish

75

&

file new view

view view
new file :-

new file

add table or view other .

85

&

test add :-

fields run query

95

&

view design

1 view . :-

sql .

view update creiteria .

form

- . wizard

2 .new file

06

&

: wizard
.forms - wizard

: wizard
:

- .

- form wizard ok

- no,name,age test .

16

&

- :

26

&

- :

36

&

- finish .scx

form open file .Run form

-
- 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

) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) (

. Thisform.command1.caption= hello 02 =Thisform.command1.top .Thisform.command1.enabled= .T 05,05,05(Thisform.command1.forecolor= RGB

reports

96

&

view

- new file report .wizard

wizard

- report wizard .ok

- . next

07

&

- .

- .

17

&

27

&

- .

- .

37

&

- finish . frx

open file frx

open :-

47

&

preview :-

- numeric -: float numeric :- 22=Num - -: Character " " space :- =Name


57

&

)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

case 1 exp 2exp

77

&

case case otherwise do case commands .

- 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 .

procedures and function - procedure


)Procedure (procedure name return do :- ) Do (procedure name) with ( parameter list with .
97

&

- 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

clea 0=s )03,001(s=myfunc ?s func myfunc parameter n,m s=n+m retu s

38

&

48

You might also like