Comparing Visual FoxPro to Other Programming LanguagesLast reviewed: December 15, 1995Article ID: Q130456 |
The information in this article applies to:
SUMMARYMost programming languages have similar features. If you are familiar with one programming language, you can easily translate this knowledge to another language. This article compares how BASIC, C/C++, Pascal and Visual FoxPro implement the basic programming constructs in the following areas:
MORE INFORMATION
Dealing with Case SensitivityOnly C/C++ is a case-sensitive programming language.
Declaring VariablesWhen you assign a value to a variable (other than an array) that does not exist, Visual FoxPro implicitly declares it. (Arrays must be declared using the DIMENSION command). Languages that require explicit declaration of variables return an error.
Adding CommentsEach language has its own format for adding comments to programs. Visual FoxPro has different formats for whole line comments and for comments on partial lines.
Storing Values to Variables (Assignment Statements)Pascal requires a colon in the assignment statement.
Structuring IF StatementsEach language offers equivalent IF functionality.
Structuring CASE StatementsOnly Pascal does not offer ranges in CASE statements.
Structuring FOR LoopsEach language offers a FOR statement. C/C++ has the most flexibility for expressions.
Structuring WHILE LoopsEach language offers equivalent WHILE loop functionality.
Each language permits passing parameters by value.
Passing Arguments by ReferenceYou can pass parameters by reference two ways in Visual FoxPro.
Syntax: SET UDFPARMS TO <VALUE> or <REFERENCE> For more information on the SET UDFPARMS command, please see the "SET UDFPARMS" topic in Visual FoxPro Help file. For more programming language comparisons, please see the "Visual FoxPro and Other Programming Lauguages" topic in the Visual FoxPro Help file.
|
Additional reference words: 3.00 3.00b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |