Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate number
Message
De
17/01/2005 07:57:53
 
 
À
15/01/2005 15:08:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00977470
Message ID:
00977711
Vues:
33
>i get the idea from your code,
>i write this code under,it works,if you have newway to writ it ,it is welcome

We can do something as:
if  thisform.text1.value =< 2000
    thisform.text2.value      = thisform.text1.value * 0.05
else
    if  thisform.text1.value =< 30000
        n1                    = 2000*0.05                  && mean 100
        m.a1                  = thisform.text1.value - 2000
        ? n1,m.a1
        *
        n2                    = iif(m.a1>0 and m.a1>4000, 4000, m.a1) * 0.10
        ? n2
        m.a2                  = m.a1 - (4000)
        *
        n3                    = iif(m.a2>8000, 8000, m.a2) * 0.20 && mean 1600
        ? n3
        *
        m.a3                  = m.a2 - 8000
        *
        if  m.a3 <= 0
            n4                = 0
        else
            n4                = IIF(m.a3>16000, 16000, m.a3) * 0.25
        ENDIF
        ? n4,m.a3
    endif
endif
thisform.text2.value   = n1 + n2 + n3 + n4
Claudio
"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
Répondre
Fil
Voir

Click here to load this message in the networking platform