Dec 092017
Supermarket shopping list.
File SUPERMKT.ZIP from The Programmer’s Corner in
Category Games and Entertainment
Supermarket shopping list.
File Name File Size Zip Size Zip Type
SHOP.BAS 31698 6932 deflated
SHOP.DOC 11016 4076 deflated

Download File SUPERMKT.ZIP Here

Contents of the SHOP.DOC file


July 7, 1986


DISCLAIMER ........................................... 1

OVERVIEW ............................................. 2

USING THE PROGRAM .................................... 3

MISCELLANY ........................................... 4

Page 1


We got the idea for this program because my Daughter the
Shopper found she was making too many trips to the
supermarket, doing too much impulse buying, and in general
wasting time and money. Now she has a handle on what she
spends, we rarely run out of things, and handle the nuisance
of grocery shopping more efficiently. It does look a little
strange to people, seeing her running around the supermarket
with a computer printout, but what the heck!

The program is offered to the public as is, and no
responsibility is assumed for any damage arising from its'
use. It is hoped that you find it helpful in the drudgery of
grocery shopping.

The program runs on a PC Jr, PC/XT, and PC/AT. It requires
128k of memory and one diskette drive. It was written in
BASIC, using BDS (Basic Development System) under DOS 2.1. An
IBM Graphics Printer or equivalent is also required for
printing the Shopping List.

The source code was originally 31k in length, but BDS was used
to shorten variable names, combine lines, and delete comment
lines. As a result, for debugging purposes, variable name
meanings will not be obvious.

Although she doesn't intend any further releases or general
maintenance, if bugs are found, please leave a message on the
board where you downloaded the program, and if possible,my
Daughter the Programmer will give you the patch.

One last point - if the program does nothing else, at least
maybe it'll get the lady of the house involved in the computer
and perhaps she'll finally understand why you spend so many
hours on it!

Harvey Scali - the Father: Eater of the groceries.

Susan Scali - the Daughter: Chief Coupon Clipper,
Programmer, and Shopper par Excellence!

Page 2


The program lets you create up to 19 shopping categories,
choose. Within each category you can create up to 20 item
types - for example, in the DAIRY category you might have

There is a 20th category that is pre-set as "OTHER STORES".
This also allows up to 20 items that you might purchase
elsewhere - drugstore, gas, etc. On the printed shopping
list, this category shows on a separate page.

You can create, change and delete categories and items. You
also assign to each item a description, an allocation (how
many of the item should be on hand), the in-stock position,
and a price.

There is also a "Statistics" option that shows, within a given
time period, how many times you shopped for an item, and the
total number of that item bought. This is useful in that, if
you find you shopped for an item 5 times in one month and
purchased a total of 5 of that item, then your allocation is
obviously too low and you are wasting time at the store -
unless, of course it's a perishable item. Using this option
requires that you set the date before running this program.

As you use items, you would keep a record and periodically
update your shopping list in the program. When you are ready
to actually do the shopping, you would print the list. It
would show the category, the items within the category by
name, description, how many to buy, the price, extension, and
expected total.

When the shopping list is printed, a temporary file is created
from what was on the list. After having shopped you would
update this file with what you actually purchased. The item
file would be updated accordingly.

For more efficiency, you can arrange the categories in an
order that approximates the layout of aisles in the store or
stores you shop at. That way the printed list will be such
that you can literally proceed through the store from one end
to the other, and not have to jump around on the list or in
the store. You can specify as many store layouts as you want.
They will be kept in their own files.

Initially it will require some work to determine your
categories and items, to figure what each allocation should
be, and to know the prices. Use of the program will give you
more familiarity with these details, as you shop and note what
you spend and how often you buy an item. You can then adjust

You should back up your files, for safety' sake, and in the
event that you mess them up with changes, etc., beyond repair.

Page 3


When you start the program, you'll be asked for a work file
drive - the one on which you want your category, item, and
store layout files to reside. We use a ram disk for these for
speed's sake. However, you can go through the program and
hardcode a drive if you like, by taking out certain lines.
See Page 4 for the line numbers.

Empty category and item files will be created the first time
through the program. The category file is a 21 record
sequential file. Each of the first 20 records contains the
category name and record number of the first item in that
category. The 21st record is the date - see "Statistics",
above. The item file is a random file, 17200 bytes in length.
Although the first item in a category is found randomly, the
remaining 19 item records are gotten sequentially. This
method shortens the access time to an item considerably.

You would then use option 5 on the main menu (FILE
MAINTENANCE) and proceed to fill in your categories and then
your items. Category and item names, and item descriptions
are restricted to 15 characters each, and a beep will sound if
you exceed this. At any point, from the FILE MAINTENANCE
menu, you can display categories and items, delete/change/add
categories and items. The options in the menu are self
explanatory. If you delete a category, the corresponding item
records are also deleted, the categories are "moved up" to
fill the empty designation, and the item record pointers
updated accordingly.

From the MAIN menu, Option 1 will let you update - either the
shopping list or the stock - i.e., as you use items you would
update the list of what you need to buy. After you buy them,
you would update the stock. The option will lead you
accordingly. Option 2 allows you to display or print the
shopping list. If you opt to print it, at that point the
temporary file will be created, which is the input to updating
the stock (Option 1). Displaying the list will not cause any
updates, but merely show you what you need to buy so far.
Option 3 will allow you to display or print the entire item
file. Option 4 is the STATISTICS option. You will be shown
the date of the last stock update. If you want to keep track
monthly of the statistics, you will be given the option of
erasing that date. Your statistics file will then begin again
when you next update the stock.

Overall, the menus guide you and there is not much need for
further explanation as to their use. There are instances
though, where a single key input will be required, without
hitting the ENTER key, and others where the ENTER key must be
pressed. The latter are where input would possibly be more
than one character. All menu options require pressing only
the number of the option, whereas, looking at a specific
category or item requires pressing ENTER after the number.
Any prompts requiring a "yes, no, or quit" answer require only
pressing the y, n or q keys. Most null inputs will take you
back to the previous menu.

Page 4


There is more to the program than described above, but using
it will make you familiar with it, rather than supplying a
lengthy description here. The following, however is
information on the files created, and hard-coding a Work


The files created by the program the first time you invoke it
CAT. - The Category File - sequential
ITEMS. - The Item File - random

Printing the shopping list creates the file 'TEMP.' - a
sequential list of the items and quantities to be purchased.
Used as input to the stock updating function, and then deleted
by the program.

Store sequence file - created just prior to printing the
Shopping List, if you opt to do so. The program appends the
prefix .STR to the file when you supply the store name. It
can be saved and called for before printing the Shopping List.
Sequence files can be created for as many stores as you like.
They will be displayed if you ask for an existing Sequence
file, and you would choose the particular one at that time.
The shopping list would then print in that store's aisle

Hard-Coding the Work Drive:

All the files named above must reside on the work drive. To
hard-code the work drive, rather than having the initial
prompt for a drive letter come up each time you run the
program, remove lines 20, 30, and 40 (the Prompt statements).

Next, change the variable DRV$ to the drive and a colon -
i.e., 'c:'. For example, the statement

OPEN DRV$+"items" as #1

would be changed to read

OPEN "c:items" as #1

The line numbers to change are:

50, 60, 1130, 1140, 1490, 1570, 1670, 2050 (3), 2140,
2470, 2590, 2610, 2630, 2670, 2710, 2930 (2), 3110 (2)

where the number in parentheses indicates the number of times
the variable DRV$ appears in that line.


 December 9, 2017  Add comments

Leave a Reply