Re: Entering Time Values

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

Here's another way to do what you want:

sequence now
sequence lunchtime

now = date()

now = sprintf("%02d:%02d"&10,now[4..5])
puts(1,"The current time is: "&now)

puts(1,"What time would you like to eat? ")
lunchtime = gets(0)
if find(':',lunchtime) = 2 then
  lunchtime = '0' & lunchtime
end if

if compare(now,lunchtime) = 0  then
   puts(1,"Let's Eat!")
 else puts(1,"OK, wait until "&lunchtime)
end if

Regards,
Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu