Today I found an interesting whitepaper, written by Pertti Karjalainen, one enthusiastic NetCompiler user.

It is all about how to implement your own VFP functions in the Net Compiler.

***If you know VFP, even a little (and even if you don't know much at all about .NET), you, too, can participate in building a fully VFP syntax -compatible compiler for .NET. All you need to know is VFP syntax, you don't need to know C# or VB.NET or any other "foreign" stuff, to get started at least.

Disclaimer: I am in no way affiliated with eTecnologia.net, financially or otherwise. Heck, I don't even know where these guys are located! But the budding technology here is quite amazing and holds a lot of promise for us soon-to-be-orphaned-from-Microsoft VFP developers.

To differentiate the .NET version from the VFP version for unit testing, I prefaced the function name with "_", but this is by no means a generally accepted way, it just made sense to me. Which is not to say that it might not collide with internal .NET functions or accepted .NET syntax rules.)

4. Make sure that you have also downloaded and extracted the VFP Runtime ZIP file from the same page into the same folder where your mydemo.exe is

5. Go to the VFP compiler folder in MS-DOS prompt

6. Type MYDEMO.EXE

7. See the resulting output

It really is that easy. And now we have added one more of the as-of-yet unimplemented functions (BETWEEN()) to the VFP .NET compiler. Granted, this is an easy one, but the majority of the missing functions are about as easy. And the funny thing is that this is both the egg and the hen, since we are writing VFP syntax to implement VFP syntax. Boggles the mind.

And here's my unit test listing, which may serve as a template (to be improved, for sure). This unit test makes sure that the _BETWEEN() function behaves exactly like the VFP's BETWEEN () function under all circumstances.

Test cases for BETWEEN_E -function (etechnologia replacement for VFP BETWEEN(var1, var2, var3)NOTES: Run this test in VFP, not the .NET compiler!This test covers the most likely data types: numeric, date and character.To complete unit test, we should probably add all of other possible VFP data types.

So, what are you waiting for? Implement your own "pet" function, test it thoroughly and then send it over to etechnologia.net, so that can be integerated and implemented as a truly .NET compatible VFP function for the entire community!