>Hi Cetin,
>
>
If a program needs to refer to thisform then I send it thisform as a parameter.
>But as per Execscript why do you filetostr() and execscript.
>Do relatorio with thisform
>Is a more direct and reliable way and faster than Execscript (doesn't recompile).
>It gets it as a toForm parameter and report could also use toForm.>
>I use ExecScript because it is a particular routine and I use it in just one client.
>
>Le me explain better...
>
>I have an application that is used for some companies... And one of these companies ask me a little change, but I don't like to change my original app... So, I do something like that:
>
>If File("SPECIALROUTINE.PRG")
> ExecScript(FileToStr("SPECIALROUTINE.PRG"))
>Else
> Report Form MyReport To Printer NoConsole
>EndIf
>
>
>and then, in this specific client, I put some code in SPECIALROUTINE.PRG... ;-)
>
>[]s!
Rodolfo,
Addition to previous message why I insists on 'do' :)
ExecScript compiles each time it's called (internally it's :
copy code to a temp file
compile and execute)
With 'do' you might either directly send .fxp to client or compile once there.
I did similar thing with ExecScript and ended with DO version (especially if sending parameters).
You can still use StrToFile(lcPrg,'SpecialFunc.prg') if you're storing them in a table or something like that (would directly store compiled versions there).
Cetin