Visual FoxPro
From Wikipedia, the free encyclopedia
Remove ads
Visual FoxPro ialah sebuah bahasa pengaturcaraan bertatacara dan berorientasi objek berpusatkan data (data-centric) yang dikeluarkan oleh Microsoft. Ia terhasil daripada FoxPro (pada asalnya dikenali sebagai FoxBASE) yang dimajukan oleh Fox Software pada awal 1984. Fox Technologies bergabung dengan Microsoft pada 1992 dan atur caranya mendapat ciri-ciri tambahan dan awalan "Visual". Versi terakhir FoxPro (2.6) boleh dilaksanakan menggunakan sistem pengendalian Mac OS, DOS, Windows, dan UNIX: Visual FoxPro 3.0, versi "Visual" pertama, menyingkir sokongan pelantar hanya kepada Mac dan Windows, dan versi berikutnya hanya pelantar Windows sahaja. Versi terkini Visual FoxPro adalah berasaskan COM dan Microsoft telah menyatakan bahawa mereka tidak berniat untuk mencipta versi Microsoft .NET.
FoxPro adalah ahli kepada bahasa dalam kelas yang biasanya dirujuk sebagai bahasa "xBase", di mana sintaksnya berasaskan bahasa pengaturcaraan dBase. Ahli lain keluarga bahasa xBase termasuk Clipper dan Recital. (Sejarah awal xBase boleh di lihat dalam rencana dBASE.)
Visual FoxPro, biasanya diringkaskan sebagai VFP, biasanya dianggap umum sebagai hanya sistem pengurusan pangkalan data - database management system (DBMS). Ini menidakkan fakta bahawa ia merangkumi bukan hanya enjin DBMS, tetapi juga ciri penuh bahasa pengaturcaraan. Ia boleh digunakan bukan sahaja untuk menulis perisian pelanggan gemuk - fat client, tetapi juga bagi middleware dan penggunaan web.
Remove ads
Maklumat versi
Keserasian sistem operasi
Maklumat mengenai File Perlaksanaan
Remove ads
Contoh kod
Objek
loForm = CREATEOBJECT("HiForm") loForm. Show(1) DEFINE CLASS HiForm AS Form AutoCenter = .T. Caption = "Hello, World" ADD OBJECT lblHi as Label WITH ; Caption = "Hello, World!" ENDDEFINE
loMine = CREATEOBJECT("MyClass") ? loMine.cProp1 && This will work. ? loMine.cProp2 && Program Error: Property CPROP2 is not found. ? loMine. MyMethod1() && This will work. ? loMine. MyMethod2() && Program Error: Property MYMETHOD2 is not found. DEFINE CLASS MyClass AS Custom cProp1 = "My Property" && This is a public property HIDDEN cProp2 && This is a private (hidden) property PROCEDURE Init() && Class constructor This.cProp2 = "This is a hidden property." ENDPROC PROCEDURE MyMethod1() && This is a public method RETURN This. MyMethod2() ENDPROC HIDDEN PROCEDURE MyMethod2() && This is a private (hidden) method RETURN This.cProp2 ENDPROC ENDDEFINE
Pengendalian data
* Create a table CREATE TABLE randData (iData I) * Populate with random data using xBase and SQL DML commands FOR i = 1 TO 50 APPEND BLANK REPLACE iData WITH (RAND() * 100) INSERT INTO randData (iData) VALUES (RAND() * 100) ENDFOR * Place a structural index on the data INDEX ON iData TAG iData CLOSE ALL * Display sorted data using xBase-style commands USE randData SET ORDER TO iData GO TOP LIST NEXT 10 && First 10 (end-of-line comment) SKIP 81 LIST NEXT 10 && Last 10 CLOSE ALL * Browse sorted data using SQL DML commands SELECT * ; FROM randData ; ORDER BY iData DESCENDING
ODBC Access using SQL Passthrough
* Connect to an ODBC data source LOCAL nHnd nHnd = SQLCONNECT ("ODBCDSN", "user", "pwd") * Execute a SQL ccommand LOCAL nResult nResult = SQLEXEC (nHnd, "USE master") IF nResult < 0 MESSAGEBOX ("MASTER database does not exist!") ENDIF * Retrieve data from the remote server and stores it in * a local data cursor nResult = SQLEXEC (nHnd, "SELECT * FROM authors", "QAUTHORS") * Update a record in a remote table using parameters LOCAL cAuthorID, cAuthorName cAuthorID = "1001" cAuthorName = "New name" nResult = SQLEXEC (nHnd,"UPDATE authors SET auth_name = ?cAuthorName WHERE auth_id = ?cAuthorID") * Close the connection SQLDISCONNECT(nHnd)
Remove ads
Nama kod Beta
- VFP 3 - Taz
- VFP 5 - RoadRunner
- VFP 6 - Tahoe
- VFP 7 - Sedona
- VFP 8 - Toledo
- VFP 9 - Europa
- VFP Next - Sedna
Pautan luar
Laman Microsoft
Laman lain
- Visual FoxPro Wiki The biggest repository of FoxPro information (written in VFP)
- Board to get help for Visual FoxPro in English, Spanish, Portuguese and French
- A site devoted to the history of FoxPro
- ActiveVFP Diarkibkan 2020-10-28 di Wayback Machine Open Source, free FoxPro web development framework
- Visual FoxPro news, updated regularly
- Foxstuff (collection of technical articles relating to Visual FoxPro)
- FoxPro Summary for quick references and beginners Diarkibkan 2006-09-17 di Wayback Machine
- Hentzenwerke Publishing - noted publisher of books on Visual FoxPro
- Virtual FoxPro User Group - free online support resource
- ProFox mailing list
- Introduction and tutorial
- Active FoxPro Pages FoxPro based replacement for ASP
- Programming Windows OS in Visual FoxPro Online reference
- www.foxite.com Free online Visual FoxPro Community
- VFPx A Visual FoxPro Community effort to create open source add-ons for VFP 9.0
Remove ads
Rujukan
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads