Microsoft KB Archive/112495

= PRB: Macro Substitution Doesn't Work with M Prefix =

Article ID: 112495

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.0
 * Microsoft FoxPro 2.5b for MS-DOS
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b for MS-DOS
 * Microsoft FoxPro 2.5b for Macintosh

-



This article was previously published under Q112495



SYMPTOMS
Macro substitution fails on variables that use the M prefix ("m." or "m->").



RESOLUTION
Use the variable without the M prefix.



STATUS
This behavior is by design.



MORE INFORMATION
The M prefix is used to differentiate between memory variables and database fields with the same name. It is not needed for memory variables whose names do not match any field names in the current work area.

Steps to Reproduce Problem
Assuming a database called CUSTOMER.DBF (you can use the one from the TUTORIAL subdirectory) is in the current directory, type the following in the Command window: testvar = "CUSTOMER" USE &m.testvar This causes the following error message:

File '&m.testvar' does not exist.

Other Error Messages
Using a variable with the M prefix in macro substitution for the WHEN clause of a SQL SELECT statement may cause the following error message:

Syntax Error.

Additional query words: VFoxWin FoxMac FoxDos FoxWin period dot errmsg err msg akz

Keywords: kberrmsg KB112495

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.