Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum
Message
De
03/07/2004 05:03:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
30/06/2004 10:39:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Sum
Divers
Thread ID:
00918695
Message ID:
00920403
Vues:
10
Terry,
No you would get what is typed. ie: for 1234 you would get :
+1+2+3+4
I'd use Interactivechange if I want to see result as I type.
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform