Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chaining commands
Message
From
29/01/2008 12:24:10
 
 
To
29/01/2008 12:05:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01286728
Message ID:
01286752
Views:
24
>>>This is probably a dumb question but . . . in VFP is there a way to chain multiple commands on a single line? Something like:
>>>
>>>x=4|y=6|x=14
>>>
>>>I've never seen this form but several other languages allow it.
>>
>>lcCmd = chtrtran('x=4|y=6|x=14','|',chr(13)+chr(10))
>>execscript(lcCmd)
<g>
>>
>>But to answer your direct question, NO, I don't think so.
>
>Thanks Naomi. I knew you could use CRLF but I was wondering if there was a more direct way.

Don........

Be aware that this is only an approximation. The difference is that the line would be compiled and executed as if it were a procedure. Any variables declared inside the procedure would disappear when it ends. In your case it means that unless X and Y already existed, they would not still not exist when this line is executed.

SET NIT_PICK ON
Pretty sure the CHR(10) piece is not needed
SET NIT_PICK OFF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform