Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If ...............Else not working
Message
De
04/03/2003 12:47:39
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
If ...............Else not working
Divers
Thread ID:
00761034
Message ID:
00761034
Vues:
67
Hi All
I used the following code to calculate certain hours worked but the ELSE statement gets ignored. All the values are correct.
There is some calculations before this.

" wHour = (45 - hHour)
nHour = (thetot.sum_hours - (thetot.sum_shifts - dshift.sum_shifts))
if nHour > wHour
thisform.txtNhours.value = wHour
else thisform.txtNhours.value = nHour"
Only when nHour was > than wHour did it work right that left me to conclude
that the else statment gets ignored.

I then changed it to this which solved my problem.
nHour = (thetot.sum_hours - (thetot.sum_shifts - dshift.sum_shifts))
if nHour > wHour
thisform.txtNhours.value = wHour
endif
if nHour < wHour
thisform.txtNhours.value = nHour
endif

I would just like to know if anybody can shed some ligth on this

Thanx
Koot Coetzer
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform