APPLICATIONSDIVERS ★ AMSTRAD CORDON BLEU ★

Amstrad Cordon Bleu (The Amstrad User)Applications Divers
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

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
Lines 100 to 999 - Subroutines area

100 Handling of valid/invalid responses to "input" questions.
110 Message display while files are getting updated.
120 Display routine for the various "index groups".
140 Definitions of windows for MODE 1.
150 Definitions of windows for MODE 2.
160 Reading of the first four blocks of data from an individual file.
190 Main part of the correction routine.
300 Horizontal dividing line.
400 File handling routine. Using a "TEMP" file which is Data renamed into the original file.

Lines 1000 to 8999 - Main Program area

1000 Main Command Choice.
1100 Command 1: "Add".
2100 Command 2: "Search".
3100 Command 3: "Display".
4100 Command 4: "Correct".

Lines 9000 to 9999 - Definitions of variables
Lines 10000 and on - Initialisation of all indexes.

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).

TAU

★ PUBLISHER: The Amstrad User (Australia)
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHOR: Andre URANKAR
 



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Amstrad  Cordon  Bleu    (The  Amstrad  User)    ENGLISH    LISTINGDATE: 2024-08-17
DL: 114
TYPE: PDF
SiZE: 2407Ko
NOTE: 5 pages/PDFlib v1.6

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Initimpr (Tilt)
» Applications » Ascii File Protector (Amstrad Action)
» Applications » Star Chart (SymbOS)
» Applications » Selection Sort (Amstrad Computer User)
» Applications » Compilation: E/J Folie
» Applications » Ghoul's Writer Muzaxx Collector
Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.732-desktop/c
Page créée en 293 millisecondes et consultée 2097 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.