Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TEXT ... ENDTEXT question
Message
From
03/04/2008 19:52:43
Mike Yearwood
Toronto, Ontario, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01307554
Message ID:
01308106
Views:
12
Execscript is slower than &.

>>>I want to build a long command line.
>>>
>>>This works OK:
>>>
>>>TEXT TO dothis
>>>cmsg = 'A' + 'B'+ 'C'
>>>ENDTEXT
>>>
>>>&dothis
>>>?cmsg
>>>
>>>
>>>Now trying to build a multi-line command:
>>>
>>>
>>>
>>>TEXT TO dothis
>>>cmsg = 'A' + ;
>>>'B'+ 'C'
>>>ENDTEXT
>>>
>>>&dothis
>>>?cmsg
>>>
>>>
>>>This gives an error (with or without the semi-colon). Is there a way to build up a command over more than one line?
>>>Cyril
>>
>>Don't use macro substitution. Use EXECSCRIPT() instead:
>>
>>TEXT TO lcDoThis NOSHOW
>>     cmsg = 'A' + 'B'+ 'C'
>>     MessageBox(cmsg)
>>ENDTEXT
>>EXECSCRIPT(lcDoThis)
>>
>
>Thanks for the EXECSCRIPT() suggestion. This works:
>
>cmsg = ''
>TEXT TO lcDoThis NOSHOW
>     cmsg = 'A' + ;
>     'B'+ 'C'
>ENDTEXT
>Execscript(lcDoThis)
>Messagebox(cmsg)
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform