Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem copying TXT output file????
Message
 
 
To
26/08/2001 23:19:29
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00549291
Message ID:
00549334
Views:
23
IMO, macro substitution should be used only in a few cases where there are no others ways to accomplish task, like executing dynamicaly build SQL statement. Otherwise name expression is preferable for a few reasons: more readable code, faster execution, works properly with embeded spaces in pathes and works with object properties. The name expression can be used anywhere foxpro expects name: file name, variable name, e.t.c, for example
lcFieldName = "Field1"
Replace (lcFieldName) With "SomeValue"
 is equvivalent of 
Replace Field1 With "SomeValue"
>Ok, this worked... why do I need the ( ) and when should I use them? I thought the & was what I needed
>
>
>>In cases like this you should use name expression - a variable enclosed in parentheses.
>>
COPY FILE (gOutFname) TO (this.txtOutFname.value)   && copy
>>ERASE (gOutFname)    && Delete file
>>or
>>DELETE FILE (gOutFname)
>>
>>
< SNIP >
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform