Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I cant belive I have not come across this before -But
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00451364
Message ID:
00451372
Vues:
28
Bob,

Pass the variable BY REFERENCE, that way the called routine can modify it's value:
FormValidate( m_valid, @m_errormsg )
? m_errormsg

*FormValidate.prg
lparamters plValid, rcError && I use r as the prefix for reference variable

rcError = "here's what's wrong"
return
>If I want to pass two var to valid program
>I seem to be able to return the value of one of the parameters. ?
>and the other one. is reset in the calling program
>
>Here what I do
>*program one
>m_valid=.f.
>m_errormsg
>do formvalidate with m_valid,m_errormsg
>
>****
>formvalidate.prg
>param m_valid m_errormsg
>
>m_valid=.t.
>m_errormsg="No Error"
>
>*this is where my trouble is..
>*I cant do this.
>* and if I make m_errormsg public. it gets reassigned to "" when it gets returned.. ?
>
>---- return m_valid m_errormsg---
>
>how does someone change the values of two vars with a function or procedure that is set in the first calling program.. ?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform