Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop wringing your hands and put them to better use!
Message
From
31/03/2007 02:53:33
 
 
To
31/03/2007 02:22:27
General information
Forum:
Visual FoxPro
Category:
VFP Compiler for .NET
Miscellaneous
Thread ID:
01210549
Message ID:
01210689
Views:
15
Thomas:

Isn't it Awful Early over there in Frankfurt to be writing UT missives, and on a Saturday morning, no less?!? 8-]

>You probably have seen that I left that area mostly out in my implementation. The reason was that .Net is a statically typed language - and I looked into the vfp toolkit to get an idea how they handled methods with the same name but different method signature. Well, just like java<g>. So I could refrain from writitng the needed other stubs any method capable of working with different parameter types needs (this is only a guess, not a missive from ETec).

Well, yes, .NET is a statically typed language, but in this case it doesn't matter, because the VFP .NET implementation is NOT (necessarily) statically typed. So, you don't need to overload the same function for different parameter types, just like you don't need to do it in VFP (for better or for worse). So, you CAN make these calls with different parameter datatypes for example to the one and only _BETWEEN function:

_BETWEEN(1,2,3)
_BETWEEN('B','A','C')
_BETWEEN(DATE(), DATE()+1, DATE()-1)

The one function ( _BETWEEN(tu1, tu2, tu3) deals with the incoming datatypes dynamically (hence the "u" in the parameter name, meaning "unknown datatype")! What a concept!!! Try THAT in C# or VB.NET and watch the compiler puke.

Of course, this approach uses more CPU cycles than strongly typed parameters, which WOULD necessitate overloading and run faster. But if VFP compatibility is your goal, here's your simple, 100% compatible solution, and if you don't call the function in a big loop, who will notice a fraction of a second? Honestly...

I don't doubt that more people will eventually join the effort, once it gets a little better organized. I sense "Stick-It-to-the-Man" and "Don't-Tell-Me-It-Can't-Be-Done" emotions bubbling just below the surface, waiting to be stirred into action.

And if it finally doesn't pan out, so be it. There are other fish to fry in the ocean. But at least we will give it our best shot, no?

Gute Nacht (oder Guten Morgen?), Thomas!


Pertti
Pertti Karjalainen
Product Manager
Northern Lights Software
Fairfax, CA USA
www.northernlightssoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform