
** ENTER CMD
* SET UP
SET INDEX TO LAST,KEY
STORE t TO SILLY
DO WHILE SILLY
STORE 'ENTER BUSINESS NAMES UNDER "LAST NAME"' TO prompt1
STORE '                    ' TO firstm
STORE '                    ' TO lastm
STORE '                              ' TO addressm
STORE '               ' TO citym
STORE 'ARIZ' TO statem
STORE '     ' TO zipm
STORE '(602)' TO acodem
STORE '        ' TO phone1m
STORE '        ' TO phone2m
STORE '          ' TO keym
STORE '?' TO choice
STORE chr(31) TO b
* CLEAR AND PRESENT SCREEN
ERASE
@ 1, 0 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 1,30 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 1,50 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 2, 0 SAY "&B"
@ 2,30 SAY "ENTER RECORDS"
@ 2,78 SAY "&B"
@ 3, 0 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 3,30 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 3,50 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 4, 0 SAY "&B"
@ 4,78 SAY "&B"
@ 5, 0 SAY "&B   FIRST NAME"
@ 5,15 GET firstm PICTURE '!!!!!!!!!!!!!!!!!!!!'
@ 5,40 SAY "LAST NAME"
@ 5,51 GET lastm PICTURE '!!!!!!!!!!!!!!!!!!!!'
@ 5,78 SAY "&B"
@ 6, 0 SAY "&B"
@ 6,78 SAY "&B"
@ 7, 0 SAY "&B   ADDRESS"
@ 7,13 GET addressm PICTURE '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
@ 7,52 SAY "AREA CODE"
@ 7,63 GET acodem PICTURE '(999)'
@ 7,78 SAY "&B"
@ 8, 0 SAY "&B"
@ 8,78 SAY "&B"
@ 9, 0 SAY "&B   CITY"
@ 9,10 GET citym PICTURE '!!!!!!!!!!!!!!!'
@ 9,28 SAY "STATE"
@ 9,34 GET statem PICTURE '!!!!'
@ 9,51 SAY "HOME PHONE"
@ 9,62 GET phone1m PICTURE '999-9999'
@ 9,78 SAY "&B"
@ 10, 0 SAY "&B"
@ 10,78 SAY "&B"
@ 11, 0 SAY "&B   ZIP"
@ 11, 9 GET zipm PICTURE '99999'
@ 11,49 SAY "OFFICE PHONE"
@ 11,62 GET phone2m PICTURE '999-9999'
@ 11,78 SAY "&B"
@ 12, 0 SAY "&B"
@ 12,78 SAY "&B"
@ 13, 0 SAY "&B   KEYWORD"
@ 13,13 GET keym PICTURE '!!!!!!!!!!'
@ 13,78 SAY "&B"
@ 14, 0 SAY "&B"
@ 14,78 SAY "&B"
@ 15, 0 SAY "&B ************************************************"
@ 15,50 SAY "*************************** &B"
@ 16, 0 SAY "&B"
@ 16, 3 SAY prompt1
@ 16,78 SAY "&B"
@ 17, 0 SAY "&B"
@ 17,78 SAY "&B"
@ 18, 0 SAY "&B"
@ 18,78 SAY "&B"
@ 19, 0 SAY "&B"
@ 19,78 SAY "&B"
@ 20, 0 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 20,30 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
@ 20,50 SAY "&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B"
READ
* MAKE SURE USER DIDN"N SCREW UP
@ 16,3 SAY 'IS THIS ALL CORRECT ? y/n                '
SET console OFF
WAIT TO choice
SET console ON
* IF USER BLEW IT, START OVER AGAIN
IF !(choice) = 'N'
  STORE '?' TO choice
  RELEASE FIRSTM
  RELEASE LASTM
  RELEASE ADDRESSM
  RELEASE CITYM
  RELEASE STATEM
  RELEASE ZIPM
  RELEASE ACODEM
  RELEASE PHONE1M
  RELEASE PHONE2M
  RELEASE KEYM
  * GIVE USER A CHANCE TO BAIL OUT
  @ 18,3 SAY 'PRESS X TO EXIT, RETURN TO CONTINUE'
  SET console OFF
  WAIT TO choice
  SET console ON
  IF !(choice) = 'X'
    USE NAMES INDEX LAST
    RELEASE ALL
    RESTORE FROM PROMPTS
    STORE 'PHONEDEX' TO MODE
    STORE F TO SILLY
    LOOP
  ELSE
    LOOP
  ENDIF !(choice) = 'X'
ENDIF !(choice) = 'N'
IF !(choice) = 'Y'
  ERASE
  @ 10,5 SAY 'PLACING NEW FILE IN DATABASE'
  STORE '?' TO choice
  APPEND BLANK
  REPLACE first WITH firstm
  REPLACE last WITH lastm
  REPLACE keyword WITH keym
  REPLACE address WITH addressm
  REPLACE city WITH citym
  REPLACE state WITH statem
  REPLACE zip WITH zipm
  REPLACE acode WITH acodem
  REPLACE phone1 WITH phone1m
  REPLACE phone2 WITH phone2m
  * SEE IF USER HAS MORE RECORDS TO ENTER
  @ 18,3 SAY 'X TO EXIT, RETURN TO CONTINUE'
  SET console OFF
  WAIT TO choice
  SET console ON
  * IF NOT, RELEASE, AND RETURN
  IF !(choice) = 'X'
    ERASE
    RELEASE ALL
    RESTORE FROM PROMPTS
    USE NAMES INDEX LAST
    STORE 'PHONEDEX' TO MODE
    STORE F TO SILLY
    LOOP
    * CONTINUE IF USER HAS MORE TO ENTER
  ELSE
    LOOP
    ENDIF !(choice) = 'X'
  ENDIF !(choice) = 'Y'
ENDDO WHILE fun





ce) = 'X'
  ENDIF !(choice) = 'Y'
ENDDO WHILE fun



ce) = 'X'
ENDIF !(choice) = 'Y'
ENDDO WHILE fun



'                    ' TO firstm
STORE '                    ' TO lastm
STORE '                              ' TO addressm
STORE '               ' TO citym
STORE 'ARIZ' TO statem
STORE '     ' TO zipm
STORE '(602)' TO acodem
STORE '        ' TO phone1m
STORE '        ' TO phone2m
STORE '          ' TO keym
STORE '?' TO choice

STORE chr(31) TO b
ERASE
