Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run commands stored in variable
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00874695
Message ID:
00874698
Views:
15
The string literal encloused in a single or double quotes isn't affected by #DEFINE's. You've to use square brackets as string literal delimiters.
lcCommand = [DO FORM test with MODE_COMPLETE, TYPE_MAIN]
>Using vfp7...
>I want to pass a command string to a method and then
>run it.
>
>
>#DEFINE MODE_COMPLETE 1001
>#DEFINE TYPE_MAIN  1009
>
>
>
>lcCommand='DO FORM test with MODE_COMPLETE, TYPE_MAIN'
>oAppObject.runcommand(lcCommand)
>
>
>*** oAppObject.runcommand ***
>
>parameters cCommand
>
>&cCommand
>
>
>runcommand fails saying "variable MODE_COMPLETE is not found"
>
>What am I doing wrong?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform