Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Please confirm EXECSCRIPT() bug
Message
 
À
07/12/2003 16:20:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00856725
Message ID:
00856735
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform