Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum
Message
From
03/07/2004 05:03:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Sum
Miscellaneous
Thread ID:
00918695
Message ID:
00920403
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform