Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExecScript versus Macro expansion
Message
From
18/10/2002 17:47:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00713057
Message ID:
00713093
Views:
18
>I would expect ExecScript to be slower because internally it creates temporary PRG, compiles and runs it.
>
>>Hello,
>>
>> I frequently build SQL statements by concatenating strings and variables (I guess most everybody does). Is it better to use the new ExecScript function instead of the old &SqlString style macro expansion, or is there little difference between the two? Thanks

OTOH, the limitations on the length of an expansion string would not apply, and actually this script can keep several statements built on-the-fly... so the difference in speed is not the only thing to look at.

The bigger trouble with scripting is that the environment the script runs in may be somewhat isolated - may it wouldn't inherit the current dataenvironment, or wouldn't know of private variables of the caller etc (read as: I haven't tried this). If any of this is not working in a script, and may be needed, one can always write the contents of the script into a .prg file, compile it and DO it.

We seem to forget about Compile command being available now (since VFP6 SP4, AFAIK), which was the first thing to contradict Robert Green's "if you haven't seen it in three versions... you figure the rest".

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform