Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically creating method or event procedure
Message
From
25/02/1999 23:22:18
 
 
To
25/02/1999 07:28:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189903
Message ID:
00191772
Views:
24
>I should be lucky :) Kidding. There are of course things that you can't do this simple. ie: For a macro substitution to work at runtime, FP needs to see that command at least once w/o macrosubstitued.
>lcCommand = "report form"
>&lcCommand would fail if in project there is no other "report" command. I think same would apply to that trick. I don't think codeblock or alike would succeed under any circumstances, otherwise I might just compile codeblock and distribute development environment :)

I don't think this is true. It is true of course, with true compiled exes, but since VFP exes are interpreted at runtime, everything is available to macro substitute. This is why the VFP runtime is so huge: all available commands and functions are included in the runtime.

Your statement threw a flag with me, so I tested:
New project, one main prg with 2 lines:

lcCommand = "MESSAGEBOX('howdy')"
&lcCommand

This works fine.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform