Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Translating WSH sample
Message
From
27/07/2001 11:46:19
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00536302
Message ID:
00536469
Views:
8
>>Yes, integrated approach more convenient. And as I can see, MS makes steps on system level in object-oriented direction. For example, Shell32 now exports not only API functions but Shell object too. But now we on beginning of that way and WinAPI is still necessary. It would be better to allow developer work with API. It's not a problem to call a function with structure as parameter in VB.
>
>Yes but it is in VFP. ;-) This has been on my list for some time but I'm not sure if it will be implemented. The reason I think this (and this is all conjecture on my part) is that VFP uses variant data types. As such there is no "limit" on the amount of information that can be stored in a variable (beyond the limits mentioned in all VFP variables). Structures are finite contiguous blocks of memory. How can you define a finite block of memory when everything in it is variant? You can't. VFP would have to have true "strong typing" and this, I believe, would break so many applications that you could hear the screams from the moon. < s >

All the language needs is a set of constructs for easily storing and retreiving values in a new type of internal structure that is automatically serialized when passed to an external function. I think that the internal representation of current VFP types has little to do with it. Something like the following should be possible without breaking backwards compatibility.
LOCAL x AS MyType
x.Element1 = 123
x.Element2 = "Howdy"
x.Element3 = 2345

=SomeAPIFunction(@x)

DEFINE MyType AS Structure
  MEMBER Element1 AS DWORD
  MEMBER Element2 AS STRING(4)
  MEMBER Element3 AS INTEGER
ENDDEFINE
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform