REM *************************************************************************** REM **** Program Bridal Store
************************************************* REM *************************************************************************** REM *************************************************************************** REM **** Author Philip King
************************************************** REM *************************************************************************** REM *************************************************************************** REM *************************************************************************** REM **** Includes go here
***************************************************** REM ***************************************************************************
REM *************************************************************************** REM *************************************************************************** REM **** Sreen statements here
************************************************ REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** Listing of subs
and funtions
***************************************** REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** arrays decleared here
************************************************ REM *************************************************************************** imenu = 4
REM ***************************************************************************
REM *************************************************************************** REM **** arrays set
to data here
********************************************** REM ***************************************************************************
smenu(1) = "1) Edit Customer Info": smenu(2) = "3) Edit Inventory Data "
smenu(3) = "2) Edit Sales ": smenu(4) = "4) System Maintenance "
REM *************************************************************************** REM **** variables declares go here
******************************************* REM *************************************************************************** REM ***************************************************************************
REM *************************************************************************** REM **** customer info record
type ******************************************** REM *************************************************************************** REM ***************************************************************************
REM *************************************************************************** REM **** inventory record
type ************************************************ REM *************************************************************************** REM ***************************************************************************
REM *************************************************************************** REM **** point of sale
type *************************************************** REM *************************************************************************** REM *************************************************************************** lcustinforeclen
= LEN(custinforec
)
REM *************************************************************************** REM **** defines
for quick use
data types
************************************* REM *************************************************************************** REM ***************************************************************************
REM *************************************************************************** REM **** main modual
********************************************************** REM *************************************************************************** COLOR LightCyan
, MidnightBlue
iflag2 = 0
iflag3 = 1
REM *************************************************************************** REM **** main menu
loop ******************************************************* REM ***************************************************************************
menuloop:
'IF sr = "1" THEN CALL custinfo: 'GOSUB custinfo1
REM ***************************************************************************
REM *************************************************************************** REM **** customer
input modual
************************************************ REM ***************************************************************************
's0:
PRINT LEFT$(custinforec.sphone
, 3) + "/";
MID$(custinforec.sphone
, 4, 3) + "/";
RIGHT$(custinforec.sphone
, 4) 'RETURN
REM ********************************************************************
's1:
saction = "Enter Customer ID X to Exit "
ib = 9
ilow = 1
ihigh = 999999999
iflag1 = 1
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) iflag1 = 0
' RETURN
custinforec.id
= VAL(sr
):
CALL custinput
REM ********************************************************************
's2:
saction = "Enter First Name X to Exit - To Backup "
ib = 25
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
custinforec.sfirst_name
= sr:
CALL custinput
REM ***************************************************************************
's3:
saction = "Enter Last Name X to Exit - To Back up "
ib = 25
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
' IF sr = "-" THEN
' EXIT SUB
' CALL promptfname
' END IF
custinforec.slast_name = sr
REM ***************************************************************************
's4:
saction = "Enter Address X to Exit - To Back up "
ib = 30
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
custinforec.saddress = sr
REM ***************************************************************************
's5:
saction = "Enter City Name X to Exit - To Back up "
ib = 25
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
custinforec.scity = sr
REM *************************************************************************** 's6:
saction = "Enter State X to Exit - To Back up "
ib = 2
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
custinforec.sstate = sr
REM ***************************************************************************
's7:
saction = "Enter Zip Code Name X to Exit - To Back up "
ib = 5
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
custinforec.szip = sr
REM ***************************************************************************
's8:
saction = "Enter Phone Number X to Exit - To Back up "
ib = 30
ilow = 99
ihigh = 99
iflag1 = 0
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
custinforec.sphone = sr
REM ***************************************************************************
REM *************************************************************************** REM **** set custinforrec variables
to zero
or null
*************************** REM *************************************************************************** custinforec.id = 0
custinforec.sfirst_name = null
custinforec.slast_name = null
custinforec.saddress = null
custinforec.scity = null
custinforec.sstate = null
custinforec.szip = null
custinforec.sphone = null
REM ***************************************************************************
REM *************************************************************************** REM **** Sytem Header
********************************************************* REM ***************************************************************************
REM *************************************************************************** REM **** printes in
system erros
********************************************** REM *************************************************************************** IF se
= "" THEN se
= "INVALID RESPONSE" itemp1 = 40 - (itemp / 2)
'COLOR Yellow, Blue
Delay 1.5
iflag2 = 1
REM ***************************************************************************
REM ***************************************************************************** REM **** numeric
input sub ****************************************************** REM ***************************************************************************** SUB snumeric
(sr
, ilow
, ihigh
)
se = "INPUT OUT OF BOUNDS"
REM ***************************************************************************
REM *************************************************************************** REM **** alpha
input sub ****************************************************** REM *************************************************************************** SUB salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
)
iflag2 = 0
ilength2
= LEN(saction
) + 2
LOCATE 23, ilength2
' set prompt one space after action menu print COLOR Yellow
, Black:
PRINT SPC(ib
);
' changes color and prints ib spaces to screen for input lenght LOCATE 23, ilength2
' sets curser at the begining of input space from previouse line LINE INPUT sr: sr
= UCASE$(sr
) ' inputs data from user changes it to upper case
se = "ENVALID INPUT LENGTH"
sr = ""
iflag2 = 1
REM *************************************************************************** REM **** main menu
to the
screen ********************************************** REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** array
data goes here
************************************************* REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** menu prompts start here
********************************************** REM *************************************************************************** ib = 1
ihigh = 99
ilow = 1
saction = "Choose Menu Option or X to Quit "
CALL salphainput
(saction
, ib
, ilow
, ihigh
, iflag1
) REM ***************************************************************************
REM *************************************************************************** REM **** clean up the prompt area
********************************************* REM ***************************************************************************
REM ***************************************************************************