Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange function behavior
Message
De
23/06/1999 15:38:25
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/06/1999 11:13:27
Jolene Dicks
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00233004
Message ID:
00233150
Vues:
26
>If CharVar=.F.
> Return Val(CCATSVal)
>Endif
>If CharVar=.T.
> Return CCATSVal
>Endif
>
>If it finds the field and value in that table it returns the predefined CATS value from the table. But if it doesn't find it in the convert table, I used the DBGETPROP() to pick up the default value for that field. This seems to work. However, once the replace statement is executed in the main program, the replace doesn't seem to excecute. Anyone have any suggestions on what to try.

You may try putting

lnSelect=select()

right after the Lparameter line, and

select (lnSelect)

before the block I quoted. You do a replace with a function which actually selects another table, and I'm not sure where you are when you return. It's just safer to save and restore some environment in routines like this. You may also be at Eof after this Locate (btw, you don't need the GO TOP in the function - Locate will work the same without it and you'll get some speed), so Les Pinter's answer may apply to that case.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform