Sorry, but you are wrong.
RETURN TO muutsead
MUST return to the NEXT line in calling program,
WITHOUT changing the cres !
>Hi,
>
>Help states: The return value is the value returned by the script. If the script returns no value Foxpro returns .T.. You're not returning a value just (attempting) to make an assignment so .T. seems right - but then I'd also expect the same for EXECSCRIPT('x') !
>
>Regards,
>Viv
>
>>>
>Some errors change EXECSCRIPT() return value
>Repro:
>
>PROCEDURE muutsead
>cres = 'Do not touch'
>ON ERROR seterror()
>cres = EXECSCRIPT('x=y')
>MESSAGEBOX(cres)
>
>PROCEDURE seterror
>RETURN TO muutsead
>ENDPROC
>
>Result observed:
>.T.
>>>
Andrus