★ APPLICATIONS ★ DIVERS ★ AMSTRAD CORDON BLEU ★![]() |
| Amstrad Cordon Bleu (The Amstrad User) | Applications Divers |
A recipe storing program from Andre Urankar Picture the following scene: A most successful dinner party - your boss' wife remarks "you simply must let me have a copy of that recipe". Whereupon your wife responds with equal aplomb "Ami will be able to print out a copy in moments" (Ami being the CPC464, not the maid!). Alternatively, picture a kitchen drawer crammed with recipe cuttings and the frustrated cries of "the recipe I want is, somewhere in here". It was the second scene that prompted me to use the power of Ami to lend a hand and act as a RECIPE DATA BANK. The program provides the following features: Add a recipe Search for a recipe - by either name, or part of a name, or ingredient Print-out/Display - a specific recipe in detail, an index for a specific group of recipes or a total catalogue of all recipes stored Corrections to a recipe - in case errors have been made or later changes are required, or to remove a recipe (when you discover that Aunty Myrtle's recipe for yoghurt pie should have remained with Aunty Myrtle) To be effective, data banks require rapid access to mass storage devices. This program uses the micro-disc and is not really recommended for cassette operation. The concept of 'top-down' programming has been applied, which means that those people with an adventurous bent should be able to easily add expanded procedures. The program modules are as follows: Lines 1 to 10 - Preface 100 Handling of valid/invalid responses to "input" questions. Lines 1000 to 8999 - Main Program area 1000 Main Command Choice. Lines 9000 to 9999 - Definitions of variables This is rather a dangerous section in that it will clear all indexes. I would recommend that after initialisation, you HEM-out' all except line 10036 STARTING UP (1) Transfer the program from cassette to a newly formatted (both sides) disk. I would suggest that a whole disk be made available since this allows up to 400 recipes to be saved. (2) RUN the program. A title page will be screened. (3) Press the key twice. (4) Type in GOTO "10000 (and . After initialization the program returns to the title page. (5) Repeat steps (3) and (4) for the second side of the disk. (6) Optional (but strongly recommended): the program and "REM-out" lines 10000 to 10035. (7) RUN the program normally and respond as required to the prompts. SOME PROGRAM FEATURES (1) The "INKEY$" subroutine (line 100) will RETURN only if a character within the "valid$" is encountered. All other responses will result in a beep-tone, an error message, and the input question is repeated. The string defined as CONTROL1$ does all the cursor control for this procedure. Note that the character"+" (plus sign) is used as an escape key to restart the program at any time that a single character entry is required. (2) Separate windows are defined for MODE 1 and MODE 2 operation, since the shifting from one mode to the other clears window specifications. (3) In the Correction procedures, a recipe may be totally removed if its name is set as "REMOVE" (in upper case as a precaution). Each part of the recipe can be individually corrected: and additonal data can be entered. (4) The "LINE INPUT" instruction has been used to allow comma's as separators in the text. However, " (double apostrophies) must not be used. (5) The Search routine uses the powerful instruction INSTR to locate a match to a name or part-of a name. (6) HELPFUL HINT: since this program is written in BASIC, the maximum string length is 255. I would therefore suggest that longer paragraphs in the "preparation". be broken down to smaller sections for typing in. You will find that this also helps when corrections need to be made. This program has been in use in our household for some time now, and as with all "living" software changes/improvements are innevirable. (Additions can be evidenced by the strange line numbering within the main -and sub program areas). The overflowing drawer is being steadily reduced, and loosing forward to the "dinner party" scone to cap off effectiveness of the program. I hope that you find it interesting and useful as we have. (So do I, but for those people who really kant to rnah good impression, replace Horses Doovers" in line 22 with "kors d'œuvrea" - Ed).
|