>Title
> 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.
>
>Result expected
>
>Do not touch
>
>Platform:
>
>VFP 7, 8
>
>Note
>
>if EXECSCRIPT() line is changed to
>lres = execscript( 'x')
> expected result is returned !
>
>Is this VFP bug ?
No, this has nothing to do with Execscript.
The execscript returns .T., but the messagebox will transform the expression to character.
For instance the following statements do work fine (tested in VFP8)
MESSAGEBOX(.T.)
MESSAGEBOX(DATE())
If I change the call of the messagebox I get this:
MESSAGEBOX(vartype(cres))
MESSAGEBOX(ALLTRIM(cres))
hth,
Frank Camp