home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 1
/
HACKER1.ISO
/
radio2
/
ph_lzh.com
/
PH.BAS
next >
Wrap
BASIC Source File
|
1988-10-15
|
3KB
|
111 lines
'THIS IS A TURBO BASIC PROGRAM FOR GIVING YOU THE PHONETIC WORD
'FOR A HAM RADIO CALL SIGN.
'
'PRGRAM WRITTEN BY MIKE KELLY - KB4WQY
'
'*********************************************************************
'area-code display program
' cls 'why clear the screen???
'**************************************************************
DIM phoNetic$(26)
FOR x%=0 TO 25
READ phoNetic$(x%)
NEXT x%
'**************************************************************
'check for valid user input
userIn$ = COMMAND$
IF userIn$ = "?" THEN GOTO helpScrn:
'check for an extra blank char on end of command line
'this change made so my special editor can call this program
' and get results in all cases
IF RIGHT$(userIn$,1) = " " THEN
userIn$ = MID$(userIn$,1,LEN(userIn$)-1)
END IF
'**************************************************************
userIn$ = UCASE$(userIn$) 'convert to upper case
lenGth% = LEN(userIn$)
FOR x% = 1 TO lenGth%
char$ = MID$(userIn$,x%,1)
arrayNum = ASC(char$) - 65
IF arrayNum < 0 or arrayNum > 65 THEN
PRINT ,char$;" ";char$
ELSE
PRINT ,char$;" ";phoNetic$(arrayNum)
END IF
NEXT x%
'**************************************************************
PRINT
PRINT ,"<<HIT `ESCAPE' TO RETURN TO DOS>>"
PRINT ,"<< - OR - ENTER ANOTHER CALL>>"
PRINT
aaa = 0
DO UNTIL inVal%=27
userIn$ = INKEY$
userIn$ = UCASE$(userIn$)
'PRINT LEN(USERIN$)
IF LEN(userIn$) <> 0 THEN inVal% = ASC(userIn$)
IF inVal% = 27 THEN PRINT:PRINT ,"73 es cul de KB4WQY":PRINT ,"10-15-88":END
IF (inVal% < 65 AND inVal% > 27) or (inVal% > 90 AND inVal% < 255) THEN
PRINT ,userIn$;" ";userIn$
ELSEIF (inVal% > 64 AND inVal% < 91) THEN
PRINT ,userIn$;" ";phoNetic$(inVal% - 65)
END IF
inVal% = -1
LOOP
PRINT:PRINT "73 es cul de KB4WQY"
end
'**************************************************************
helpScrn:
CLS 'okay, go ahead and clear the screen for the help!!
PRINT ""
PRINT "┌──────────────────┐
PRINT "│ syntax is: │
PRINT "│ └───────────────────┐
PRINT "│1) PH [CALL] │
PRINT "│ Where CALL is the optional command │
PRINT "│ line data correspomding to the call│
PRINT "│ sign. │
PRINT "│ │
PRINT "╞══════════════════════════════════════╡
PRINT "│ PH program will display the phonetic │
PRINT "│letters for a ham radio station call. │
PRINT "│ Program by: Mike Kelly 10-15-1988 │
PRINT "└──────────────────────────────────────┘
END
'**************************************************************
DATA "ALPHA"
DATA "BRAVO"
DATA "CHARLIE"
DATA "DELTA"
DATA "ECHO"
DATA "FOXTROT"
DATA "GOLF"
DATA "HOTEL"
DATA "INDIA"
DATA "JULIETT"
DATA "KILO"
DATA "LIMA"
DATA "MIKE"
DATA "MOVEMBER"
DATA "OSCAR"
DATA "PAPA"
DATA "QUEBEC"
DATA "ROMEO"
DATA "SIERRA"
DATA "TANGO"
DATA "UNIFORM"
DATA "VICTOR"
DATA "WHISKEY"
DATA "X-RAY"
DATA "YANKEE"
DATA "ZULU"