It could be nice way to use include file with _parts_ of strings. However, it does not works in following example:
#DECLARE MyTableName Invoices
...
=messagebox([Table MyTableName does not exists!])
...
=messagebox([Table MyTableName processed.])
Message boxes show 'MyTableName' instead of 'Invoices'.
>>Hallo,
>>what's the diffrence between this three String declartions for the VFP6/SP4 Compiler ? Is that a Bug or Feature ?
>>
>>#define Const _SCREEN
>>
>>? type("Const.name")='C' && Bringt .f.
>>? type('Const.name')='C' && Bringt .f.
>>? type([Const.name])='C' && Bringt .T. ... Häääääää
>>
>>-Ibrahim
>
>The VFP compiler does not replace constants that are included in a string variable.
>
>My SWAG as to why it works with [] is because the bracket can also be used to designate an array so the compiler ignores them and does the replace. The run time engine then decides how to handle it when it is reached.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.