Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate number
Message
De
15/01/2005 13:25:20
 
 
À
15/01/2005 13:03:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00977470
Message ID:
00977477
Vues:
40
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform