PRB:Feature Not Available Error If EXE Uses Macro SubstitutionID: Q133358 2.50 2.50a 2.50b 2.60 2.60a MS-DOS
The information in this article applies to:
SYMPTOMSWhen running a stand-alone EXE (regular or extended) and executing a line of code that uses macro substitution to reference a command verb, a "Feature Not Available" error is encountered.
CAUSEWhen FoxPro creates a stand-alone executable file, the project files are scanned for FoxPro commands. The interpretations for these commands are then built into the executable. However, if macro substitution is used to directly reference a command verb, FoxPro does not evaluate the literal text stored to the variable as a FoxPro command. Thus, the interpretation for that command verb is not built into a FoxPro stand-alone executable.
RESOLUTIONHere are four techniques you can use to avoid the problem:
STATUSThis behavior is by design.
MORE INFORMATIONIt is possible to avoid problems associated with the use of macro- substituted references to command verbs without taking any direct action to avoid it. But, in these cases, one of the following has occurred:
Steps to Reproduce BehaviorThe following example uses the SET command to demonstrate this behavior: 1. Create a program (for the sake of example, call it Test) that contains 2. Add the Test program to a new project and build a stand-alone .EXE file.
3. Run the .EXE file independent of FoxPro to see the "Feature Not Example Resolution - Using an ExpressionThis example demonstrates how to use macro substitution in a command expression instead of in a line of code. If you use macro substitution in an expression, there is no reference to the command verb, so the "Feature Not Available" error is avoided. 1. Modify the Test program so that it contains this code:
2. Save the changes to the Project, rebuild the .EXE file, and run it
In this case, you are still using macro substitution to reference a portion
of the command expression, but not the SET command verb. You should see the
screen background color change to red, and the wait message pen color
appear as yellow. Because the SET command verb has not been macro-
substituted, the translation is built into the .EXE file.
Example Resolution - Reference that Command Verb Elsewhere in the CodeThis example shows that you can use a macro-substituted reference to a command verb if there is a non-macro-substituted reference to that command verb within the project. 1. Modify the Test program so that it contains this code:
2. Save the changes to the Project, rebuild the .EXE file, and run it
3. Again, you have used a non-Macro-Substituted reference to the SET
Additional reference words: FoxDos 2.50 2.50a 2.50b 2.60 2.60a
KBCategory: kbprb
KBSubcategory: FxprgMacrosub
|
|
Last Reviewed: June 17, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |