![]() Visual FoxPro v9 running on Windows XP | |
Developer(s) | Microsoft |
---|---|
Final release | |
Operating system | Windows 2000, Windows XP, and Windows Server 2003 [3] |
Platform | IA-32 [4] |
Available in | IDE: English, German, Spanish Runtime: Above plus French, Chinese, Russian, Czech, Korean |
Type | Integrated development environment, programming language |
License | Commercial proprietary software |
Website | msdn |
Visual FoxPro is a programming language that was developed by Microsoft. It is a data-centric and procedural programming language with object-oriented programming (OOP) features.
It was derived from FoxPro (which was itself descended from FoxBASE) which was developed by Fox Software beginning in 1984. Fox Technologies merged with Microsoft in 1992, after which the software acquired further features and the prefix "Visual". [5] FoxPro 2.6 worked on Mac OS, DOS, Windows, and Unix.
Visual FoxPro 3.0, the first "Visual" version, reduced platform support to only Mac [6] and Windows, and later versions 5, 6, 7, 8 and 9 were Windows-only. The current version of Visual FoxPro is COM-based and Microsoft has stated that they do not intend to create a Microsoft .NET version.
Version 9.0, released in December 2004 and updated in October 2007 with the SP2 patch, was the final version of the product. Support ended in January 2010 and extended support in January 2015. [7]
Visual FoxPro originated as a member of the class of languages commonly referred to as "xBase" languages, which have syntax based on the dBase programming language. Other members of the xBase language family include Clipper and Recital (database).
Visual FoxPro, commonly abbreviated as VFP, is tightly integrated with its own relational database engine, which extends FoxPro's xBase capabilities to support SQL query and data manipulation. Unlike most database management systems, Visual FoxPro is a full-featured, dynamic programming language that does not require the use of an additional general-purpose programming environment. It can be used to write not just traditional "fat client" applications, but also middleware and web applications.
In late 2002, it was demonstrated that Visual FoxPro can run on Linux under the Wine Windows compatibility suite. In 2003, this led to complaints by Microsoft: it was claimed that the deployment of runtime FoxPro code on non-Windows machines violates the End User License Agreement. [8]
Visual FoxPro had a rapid rise and fall in popularity as measured by the TIOBE Programming Community Index. [9] In December 2005, VFP broke into the top 20 for the first time. In June 2006 it peaked at position 12, making it (at the time) a "B" language. As of January 2023, Visual FoxPro holds position 21 on the TIOBE index. [10]
In March 2007, Microsoft announced that there would be no VFP 10, [11] thus making VFP9 (released to manufacturing on December 17, 2004) the last commercial VFP release from Microsoft. Service Pack 2 for Microsoft Visual FoxPro 9.0 was released on October 16, 2007. [12] The support of Version 9 ended on January 13, 2015. [7]
At the time of the end of life announcement, work on the next release codenamed Sedna (named after a recently discovered dwarf planet) which was built on top of the VFP9 codebase had already begun. "Sedna" is a set of add-ons to VFP 9.0 of xBase components to support a number of interoperability scenarios with various Microsoft technologies including SQL Server 2005, .NET Framework, Windows Vista, Office 2007, Windows Search and Team Foundation Server (TFS). Microsoft released Sedna under the Shared source license on the CodePlex site. Microsoft has clarified that the VFP core will still remain closed source. Sedna was released on January 25, 2008. [13] As of March 2008, all xBase components of the VFP 9 SP2 (including Sedna) were available for community-development on CodePlex.
In late March 2007 a grassroots campaign was started by the Spanish-speaking FoxPro community at MásFoxPro [14] ("MoreFoxPro" in English) to sign a petition to Microsoft to continue updating Visual FoxPro or release it to the community as open-source. On April 3, 2007, the movement was noted by the technical press. [15]
On April 3, 2007, Microsoft responded to the petition with this statement from Alan Griver: [15]
"We're very aware of the FoxPro community and that played a large part in what we announced on March 13th. It's never an easy decision to announce that we're not going to release another version of a product and it's one that we consider very carefully.
"We're not announcing the end of FoxPro: Obviously, FoxPro applications will continue to work. By some of our internal estimates, there are more applications running in FoxPro 2.6 than there are in VFP and FoxPro 2.6 hasn't been supported in many years. Visual FoxPro 9 will be supported by Microsoft through 2015.
"For Microsoft to continue to evolve the FoxPro base, we would need to look at creating a 64-bit development environment and that would involve an almost complete rewrite of the core product. We've also invested in creating a scalable database with SQL Server, including the freely available SQL Server Express Edition. As far as forming a partnership with a third-party is concerned, we've heard from a number of large FoxPro customers that this would make it impossible for them to continue to use FoxPro since it would no longer be from an approved vendor. We felt that putting the environment into open source on CodePlex, which balances the needs of both the community and the large customers, was the best path forward."
All versions listed are for Windows. [16]
Version | Release Date |
---|---|
Visual FoxPro 3.0 | June 1995 |
Visual FoxPro 5.0 | October 1996 |
Visual FoxPro 5.0a | October 1997 |
Visual FoxPro 6.0 | 18 May 1998 |
Visual FoxPro 7.0 | 27 June 2001 |
Visual FoxPro 8.0 | 1 February 2003 |
Visual FoxPro 8.0 Service Pack 1 | 7 October 2003 |
Visual FoxPro 9 | 20 December 2004 |
Visual FoxPro 9 Service Pack 1 | 8 December 2005 |
Visual FoxPro 9 Service Pack 2 | 16 October 2007 |
The FoxPro language contains commands quite similar to other programming languages such as BASIC.
Some basic syntax samples:
FOR i = 1 to 10 x = x + 6.5 NEXT&& Instead of "NEXT" can also use "ENDFOR"IF i = 25 i = i + 1 ELSEi = i + 3 ENDIFx = 1 DO WHILE x < 50 x = x + 1 ENDDOx = 1 DO WHILE .T.x = x + 1 IF x < 50 LOOPELSEEXITENDIFENDDOnMonth = MONTH(DATE()) DO CASE CASE nMonth <= 3 MESSAGEBOX("Q1") CASE nMonth <= 6 MESSAGEBOX("Q2") CASE nMonth <= 9 MESSAGEBOX("Q3") OTHERWISEMESSAGEBOX("Q4") ENDCASEFOR EACH oControl IN THISFORM.ControlsMESSAGEBOX(oControl.Name) ENDFORf = Factorial(10) FUNCTION Factorial(n) LOCAL i, r r = 1 FOR i = n TO 1 STEP -1 r = r * i NEXT&& Can also use "ENDFOR" here instead of "NEXT"RETURN r ENDFUNC
Hello World examples:
* Output at the current location ? "Hello World"* Output at a specified location @ 1,1 SAY "Hello World"* Output in a separate window, cleared on inputWAIT WINDOW "Hello World"* Output in a standard dialog box, cleared on OKMESSAGEBOX("Hello World")
* Output in a defined windowloForm=CREATEOBJECT("HiForm")loForm.Show(1)DEFINECLASSHiFormASFormAutoCenter=.T.Caption="Hello, World"ADDOBJECTlblHiasLabel ;WITHCaption="Hello, World!"ENDDEFINE
loMine = CREATEOBJECT("MyClass") ? loMine.cProp1 && This will work. (Double-ampersand marks an end-of-line comment)? loMine.cProp2 && Program Error: Property CPROP2 is not found because it's hidden externally.? loMine.MyMethod1() && This will work.? loMine.MyMethod2() && Program Error: Property MYMETHOD2 is not found because it's hidden externally.DEFINE CLASS MyClass AS CustomcProp1 = "My Property"&& This is a public propertyHIDDEN cProp2 && This is a private (hidden) propertydProp3 = {} && Another public propertyPROCEDURE Init() && Class constructorThis.cProp2 = "This is a hidden property."PROCEDURE dProp3_Access && Property GetterRETURNDATE() PROCEDURE dProp3_Assign(vNewVal) && Property Setter uses the "_assign" tag on the property nameIFVARTYPE(vNewVal) = "D"THIS.dProp3 = vNewVal ENDIFPROCEDURE MyMethod1() * This is a public method, calling a hidden method that returns* the value of a hidden property.RETURNThis.MyMethod2() HIDDEN PROCEDURE MyMethod2() && This is a private (hidden) methodRETURNThis.cProp2 ENDDEFINE
The language also has extensive database manipulation and indexing commands. The "help" index of commands in VFP 9 has several hundred commands and functions described. The examples below show how to code the creation and indexing of tables, however VFP has table and database builder screens which create the tables and indexes without making you write code.
* Create a tableCREATE TABLE randData (iData I) * Populate with random data using xBase and SQL DML commandsFOR 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 dataINDEX ON iData TAG iData CLOSE DATA && Do not close open libraries etc* Display ordered data using xBase-style commandsUSE randData SET ORDER TO iData LOCATE&& In place of GO TOP. Enforces use of index to find TOP LIST NEXT 10 && First 10GO BOTTOM SKIP -10 LIST REST && Last 10CLOSE DATA * Browse ordered data using SQL DML commandsSELECT * ;FROM randData ;ORDER BY iData DESCENDING
PRIVATE cAuthorID, cAuthorName && Private variables supplant any previous global or private variable of the same nameLOCAL nHnd, nResult && Local variables are visible only here* Connect to an ODBC data sourcenHnd = SQLCONNECT ("ODBCDSN", "user", "pwd") * Enter a loop so we can exit to the close connection code if there's an errorDO WHILE .T.* Execute a SQL commandnResult = SQLEXEC (nHnd, "USE master") IF nResult < 0 MESSAGEBOX ("MASTER database does not exist!") EXIT&& To close the connectionENDIF* Retrieve data from the remote server and stores it in a local data cursornResult = SQLEXEC (nHnd, "SELECT * FROM authors", "QAUTHORS") IF nResult < 0 MESSAGEBOX ("Unable to execute remote SQL SELECT command!") EXIT&& To close the connectionENDIF* Update a record in a remote table using parameterscAuthorID = "1001"cAuthorName = "New name"nResult = SQLEXEC (nHnd, "UPDATE authors SET auth_name = ?cAuthorName WHERE auth_id = ?cAuthorID") IF nResult < 0 MESSAGEBOX ("Unable to execute remote SQL UPDATE command!") EXIT&& To close the connectionENDIF* If we get here, we have retrieved everything successfullyEXIT&& Exit unconditionallyENDDO* Close the connectionSQLDISCONNECT(nHnd)
Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational Access Database Engine (ACE) with a graphical user interface and software-development tools. It is a member of the Microsoft 365 suite of applications, included in the Professional and higher editions or sold separately.
dBase was one of the first database management systems for microcomputers and the most successful in its day. The dBase system included the core database engine, a query system, a forms engine, and a programming language that tied all of these components together.
The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.
xHarbour is a free multi-platform extended Clipper compiler, offering multiple graphic terminals (GTs), including console drivers, GUIs, and hybrid console/GUIs. xHarbour is backward-compatible with Clipper and supports many language syntax extensions, greatly extended run-time libraries, and extensive third party support.
Harbour is a computer programming language, primarily used to create database/business programs. It is a modernised, open source and cross-platform version of the older Clipper system, which in turn developed from the dBase database market of the 1980s and 1990s.
The Access Database Engine is a database engine on which several Microsoft products have been built. The first version of Jet was developed in 1992, consisting of three modules which could be used to manipulate a database.
Microsoft Data Access Components is a framework of interrelated Microsoft technologies that allows programmers a uniform and comprehensive way of developing applications that can access almost any data store. Its components include: ActiveX Data Objects (ADO), OLE DB, and Open Database Connectivity (ODBC). There have been several deprecated components as well, such as the Jet Database Engine, MSDASQL, and Remote Data Services (RDS). Some components have also become obsolete, such as the former Data Access Objects API and Remote Data Objects.
Xbase++ is an object oriented programming language which has multiple inheritance and polymorphism. It is based on the XBase language dialect and conventions. It is 100% Clipper compatible language supporting multiple inheritance, polymorphism, object oriented programming. It supports the xBase data types, including Codeblocks. With Xbase++ it is possible to generate applications for Windows NT, 95, 98, Me, 2000, XP, VISTA and Windows 7, 8, 10.
Jinja is a web template engine for the Python programming language. It was created by Armin Ronacher and is licensed under a BSD License. Jinja is similar to the Django template engine but provides Python-like expressions while ensuring that the templates are evaluated in a sandbox. It is a text-based template language and thus can be used to generate any markup as well as source code.
C# and Visual Basic .NET are the two primary languages used to program on the .NET Framework.
In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters. The syntax of comments in various programming languages varies considerably.
Visual Studio is an integrated development environment (IDE) developed by Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms including Windows API, Windows Forms, Windows Presentation Foundation (WPF), Windows Store and Microsoft Silverlight. It can produce both native code and managed code.
Microsoft SQL Server is a proprietary relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network. Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users.
Cerner CCL (Cerner Command Language) is the Cerner Corporation fourth-generation programming language, which is expressed in the Cerner Discern Explorer solution. CCL is patterned after the Structured Query Language (SQL). All Cerner Millennium health information technology solutions use CCL/Discern Explorer to select from, insert into, update into and delete from a Cerner Millennium database and allows a programmer to fetch data from an Oracle database and display it as the user wants to see. With features like Record Structure and subroutines it allows a user to get data from a database and manipulate it by storing it in a temporary structure; execute a particular section of the code, if required using a subroutine.
Rexx is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. Proprietary and open source Rexx interpreters exist for a wide range of computing platforms; compilers exist for IBM mainframe computers.
Nemerle is a general-purpose, high-level, statically typed programming language designed for platforms using the Common Language Infrastructure (.NET/Mono). It offers functional, object-oriented, aspect-oriented, reflective and imperative features. It has a simple C#-like syntax and a powerful metaprogramming system.
ActiveVFP is a server-side scripting framework designed for Web development to produce dynamic Web pages. Similar to PHP, but using the native Visual Foxpro (VFP) language and database, ActiveVFP can also be used in Model-View-Controller (MVC) web applications as well as RESTful API. ActiveVFP is completely free and open source and does not require the purchase of Microsoft Visual FoxPro or any additional software.
The Xojo programming environment and programming language is developed and commercially marketed by Xojo, Inc. of Austin, Texas for software development targeting macOS, Microsoft Windows, Linux, iOS, Android, the Web and Raspberry Pi. Xojo uses a proprietary object-oriented language.
Ring is a dynamically typed, general-purpose programming language. It can be embedded in C/C++ projects, extended using C/C++ code or used as a standalone language. The supported programming paradigms are imperative, procedural, object-oriented, functional, meta, declarative using nested structures, and natural programming. The language is portable and can be used to create console, GUI, web, game and mobile applications.