Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please confirm EXECSCRIPT() bug
Message
 
To
07/12/2003 16:20:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00856725
Message ID:
00856735
Views:
18
>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)) &&L
MESSAGEBOX(ALLTRIM(cres)) &&Error is fired
hth,
Frank Camp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform