Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate number
Message
From
15/01/2005 13:25:20
 
 
To
15/01/2005 13:03:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00977470
Message ID:
00977477
Views:
39
>thanks,

you're welcome

>but i need somthing else as subtract the first 2000 at step1,subtract 4000 at second .....etc,e.i if mynumber after the 2 steps is=0 sum n1+n2,if mynumber after 3 steps=0 sum n1+n2+n3....

Well, maybe I didn't got you fine.. Can you be a little more "procedural".. Taking step-by-step..
if  thisform.text1.value =< 2000
    thisform.text2.value      = 2000 - (thisform.text1.value * 0.05)
else
    if  thisform.text1.value =< 30000
        n1          = 2000*0.05 && mean 100
        &&& i mean now 30000-2000
        n2          = 4000*0.10 && mean 400
        &&& 28000-4000
        n3          = 8000*0.20 && mean 1600
        &&&&24000-8000
        n4          = 16000*0.25 && mean 4000
        thisform.text2.value   = iif((n1+n2+n3+n4)>0,4000 - (n1 + n2 + n3 + n4), n1 + n2 + n3 + n4)
    else
        * your number is greaterthan 30000
    endif
endif
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform