Code Samples

The samples included here give you a glimpse of how the VFPCompiler for .NET lets you preserve your existing code-investment while allowing you to enter into the powerful world of the .NET framework.

Many samples will seem to you like the ordinary, usual code you can write in VFP. This is not coincidence, our main goal is full compatibility with the powerful VFP language. Most of the required language functionality is already implemented and we are working on completing the VFP.Runtime.dll which gives you all the VFP Functions and Commands you are accustomed to using.

Like we said before, we target full compatibility, because we ourselves have a lot of VFP code lines, so we have a valuable investment in this language and we want to be able to just recompile to the .NET Framework.

Sample Description
test_arrays01.prg Test the usual syntax of dealing with arrays, including redimensioning them dynamically.
test_bindevent.prg Shows the BindEvent functionality extended to bind to .NET Events.
test_class01.prg A typical VFP class .
test_codeblocks01.prg Shows the use of codeblocks, a powerful extension which lets you create on the fly methods and then invoke them. Think of them as FunctionPointers or .Net Delegates but more powerful.
test_dates.prg Shows using dates as usual in VFP.
test_dbcommands.prg Typical Table Commands like SKIP, LOCATE, REPLACE, SCAN. The Table Layer used is based on VFP9.
Test_docasestatement.prg Shows using the DO CASE structured block command.
test_exceptions01.prg Sample Structured Exception handling.
test_expressions.prg Several expressions like Delegates.
test_for_each_statement.prg Iterating in VFP Array using for each.
Test_forglobals.prg Shows a for loop.
test_locals.prg Simple test for Local variables.
test_modifiers.prg .NET Modifiers like static (class method, not instance method).
test_namespace.prg Namespace in VFP. This is an extension needed to create typical .NET Classes.
test_strings01.prg Testing typical strings.
test_variables.prg Test local variables with nested calls.