Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum
Message
De
30/06/2004 10:39:31
 
 
À
30/06/2004 04:26:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Sum
Divers
Thread ID:
00918695
Message ID:
00919045
Vues:
9
Cetin,

If you put this code in the interactivechange(), wouldn't you get, for an input of "1234",

1+1+2+1+2+3+1+2+3+4 ?

i.e. the len(trim(this.value) would be 1 then 2 then 3 etc., with each keystyroke. I agree it would be fine in the lostfocus().

Terry
* Textbox1 InteractiveChange or Lostfocus etc
lcValue = ""
for ix=1 to len(trim(this.Value))
 lcValue = lcValue + '+' + substr(this.Value,m.ix,1)
endfor
thisform.textbox2.value = eval(m.lcValue)
PS: It would work for single digits only and no negative values (ie:32 is interpreted as +3+2).
Cetin
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform