Re: How many days are left

new topic     » goto parent     » topic index » view thread      » older message » newer message

errrr you can actually cut this code down a bit...
(i think) you can remove the lines:

--kill these 2
>    done = FALSE
>    while not done do

--leave these 2
Prompt="Enter the current date of today(1.." &
          sprintf("%d",ThisYear[Month]) & "):"
Today =InputNum(Prompt,1,ThisYear[Month])


--kill all these
>         if Today > ThisYear[Month] then
>              Error("Invalid Date Entered")
>         else done = TRUE
>         end if
>    end while


a case of redundant error checking, i added the
ThisYear[Month] to the InputNum line, thereby automatically
sending valid dates back...
doesn't hurt to leave it in except for speed...

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu