Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiler does not catch this syntax error, bug?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901990
Message ID:
00903036
Views:
29
>This will not work:
>>
>>c = "copy file a.txt to c:\program files\my application\a.txt"
>>&c
>>
>>
>>This works:
>>
>>copy file ("a.txt") to ("c:\program files\my application\a.txt")
>>
>>
>>but most of the time, the source and dir are not fixed, so David's example makes perfect sense.

>
>Frank,
>
>I do not deny that his example makes sense.
>
>The following equally works:
>
>c = [copy file a.txt to "c:\program files\my application\a.txt"]
>&c
>
>So, this makes sence too.
>
>Dawa

Hi Dawa,

Honoustly, what makes more sense to you.

>>
>>copy file ("a.txt") to ("c:\program files\my application\a.txt")
>>
>>

or

>
>c = [copy file a.txt to "c:\program files\my application\a.txt"]
>&c
>
your example uses the [] to enforce another level of complexity to this.

Because you stated that you wanted to have a clear solution, do you really think your solution is more clear?

If you want my honest opinion, I think that you and your colleques need to understand why named expressions are better than Macro Substitution IF THEY CAN BE USED. It has nothing to do with better reading of the code. Sometimes a new version of VFP gives you a better way to solve a problem. You should embrace it instead of resist it.

But that is just my humble opinion,
Frank Camp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform