>Thanks!
>Albert
Just to let you know
There is a lot of IF in the code to form a ring. Typical codemonkey approach. :)
This could be done quicker with the following formula using modulo:
lnHours = 24
lnNewHour = (lnOldHour+lnChange)%lnHours
try
clear
lnOldHour = 24
lnHours = 24
lnd = 1
FOR lnchange = 1 TO 25
lnOldHour = (lnOldHour-lnd)%lnHours
?lnOldHour
ENDFOR
or
clear
lnOldHour = 24
lnHours = 24
lnd = 1
FOR lnchange = 1 TO 25
lnOldHour = (lnOldHour+lnd)%lnHours
?lnOldHour
ENDFOR
new you loop between 1 and 00
lots of if less :)
and even if somebody enters 55 -> the modulo will fit it.
Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]