Hi,

Don't know if it's a localization problem (I'm running a french Win2k), but
the long time returns me format like :
put the long time
-- "13:38:14 "
Withouy any AM or PM considerations... this might make your test failed.

Such minor modifs I've made and try successfully : (but Iv've not set my
clock may daytime for test all possibilities... Here it's 13:46, so it
should work!

global gName
 on getTimer me
  CurrentTime = the long time
  if currentTime >= "00:00:00" and currentTime <= "12:59:59" then
    member("Hi").text = "Hi!" &&gName&", Good Morning!!!"
  else if currentTime <= "17:59:59" then
    member("Hi").text = "Hi!" &&gName&", Good Afternoon!!!"
  else if currentTime <= "21:59:59" then
    member("Hi").text = "Hi!" &&gName&", Good Everning!!!"
  else
    member("Hi").text = "Hi!" &&gName&", Good Night!!!"
  end if
end

Hopr this helps,
S�bastien

> Hi, could anyone please take some time to check my simple code? I can't
get
> the correct output. I think there must be something wrong with my logic.
> Sorry to waste you gays time. Thanks.
>
> global gName
>
> on getTimer me
>   CurrentTime = the long time
>   if currentTime >= "12:00:00 AM" and currentTime <= "12:59:59 AM"  then
>     member("Hi").text = "Hi!" &&gName&", Good Morning!!!"
>   else if currentTime >= "01:00:00 AM" and currentTime <= "11:59:59 AM"
then
>     member("Hi").text = "Hi!" &&gName&", Good Morning!!!"
>   else if currentTime >= "12:00:00 PM" and currentTime <= "12:59:59
PM"then
>     member("Hi").text = "Hi!" &&gName&", Good Afternoon!!!"
>   else if currentTime >= "01:00:00 PM"  and currentTime <= "05:59:59 PM"
> then
>     member("Hi").text = "Hi!" &&gName&", Good Afternoon!!!"
>   else if currentTime >= "05:59:59 PM"  and currentTime <= "09:59:59 PM"
> then
>     member("Hi").text = "Hi!" &&gName&", Good Everning!!!"
>   else
>     member("Hi").text = "Hi!" &&gName&", Good Night!!!"
>   end if
> end


 
______________________________________________________________________________
Vous avez un site perso ?
2 millions de francs � gagner sur i(france) !
Webmasters : ZE CONCOURS ! http://www.ifrance.com/_reloc/concours.emailif



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to