Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who Called Me?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00436100
Message ID:
00437031
Views:
25
>Sorry, not true. As far back as FoxBASE+, the name of the calling program and the call stack has been available (via SYS(16)). Further, if you're speaking about the runtime evaluation of expressions (ie MyObj = EVALUATE("ThisForm.SomeObject") what's happening at run-time is the name is resolved and an object reference to it return. At any rate, the code is, already compiled. I'm not thoroughly familiar with the exact way the compiler handles it (probably via a pointer to the parent), nevertheless the compiled code still exists.

I think we're trying to say the same thing here. In an OO language, the compiler will generate code that will determine the class of an object at run-time (possibly by the pointers to the parent, as you suggested, or other information which may be on the stack, e.g. passing 'this' as a parameter).

All I was trying to say in the first place was that the questioner was generating this code himself rather than the compiler generating the code.

In my work, I use a variety of OO languages, each will have its own strategy of determining classes at run-time. My original comment was not specific to Foxpro, just to the general concept that behind the scenes in OO languages, various techniques are used to determine information about the caller of a function & that this might be one of those.
Mike

"I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong." - Richard Feynman
Previous
Reply
Map
View

Click here to load this message in the networking platform