MENUS

 BBS: Inland Empire Archive
Date: 01-26-93 (12:13)             Number: 391
From: JOHN GREAVES                 Refer#: NONE
  To: ERIC MAYS                     Recvd: NO  
Subj: MENUS                          Conf: (2) Quik_Bas
Hi Eric,
In a letter to all you asked how to
EM>GET A CLOCK ON THE SCREEN.
I am sure there are lots of ways. here is one

SUB printtime
tx$ = LEFT$(TIME$, 2)
SELECT CASE tx$
CASE IS = "00": t1$ = "12"
CASE IS = "01": t1$ = "1"

CASE IS = "02": t1$ = "2"
CASE IS = "03": t1$ = "3"
CASE IS = "04": t1$ = "4"
CASE IS = "05": t1$ = "5"
CASE IS = "06": t1$ = "6"
CASE IS = "07": t1$ = "7"
CASE IS = "08": t1$ = "8"
CASE IS = "09": t1$ = "9"
CASE IS = "10": t1$ = "10"
CASE IS = "11": t1$ = "11"
CASE IS = "12": t1$ = "12"
CASE IS = "13": t1$ = "1"
CASE IS = "14": t1$ = "2"
 CASE IS = "15": t1$ = "3"
CASE IS = "16": t1$ = "4"
CASE IS = "17": t1$ = "5"
CASE IS = "18": t1$ = "6"
CASE IS = "19": t1$ = "7"
CASE IS = "20": t1$ = "8"
CASE IS = "21": t1$ = "9"
CASE IS = "22": t1$ = "10"
CASE IS = "23": t1$ = "11"
END SELECT
t$ = LEFT$(TIME$, 2)
IF t$ > "12" THEN x$ = "pm"
IF t$ < "12" THEN x$ = "am"
tim2$ = RIGHT$(TIME$, 5)
tim2$ = LEFT$(tim2$, 2)
LOCATE 14, 20
IF t$ >= "12" AND t$ < "17" THEN
PRINT "Good afternoon, "; "the time is "; t1$; ":"; tim2$; SPACE$(1); x$
END IF
IF t$ < "12" THEN
PRINT "Good morning, "; "the time is "; t1$; ":"; tim2$; SPACE$(1); x$
END IF
IF t$ >= "17" THEN
PRINT "Good evening, "; "the time is "; t1$; ":"; tim2$; SPACE$(1); x$
END IF
SLEEP 3
END SUB


I hope this code will help. I use it with one of my menu programs.
As I am a fairly new programer it was developed with a lot of input from
this echo. Change it however you like. Good Luck with your menu. John
                           Greaves
--- RAMail 3.15
 * Origin: Sunshine Valley's DCI BBS - (604) 442-2386  (1:353/400)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET