Task 3 Supplementary Instructions

  1. Choose a particular program that will need to be used for the class project (e.g., check payment, verification of user's identity, look up lowest cost for a procedure). Do not use one of the examples we did in class.
  2. Write out the draft of a program that will accomplish that goal.
    use a separate line for each command
    use at least one of each of the list of generic commands below (CALC and DO are optional)
    develop at least twelve lines of code
    remember that part of most of these programs will require you to OUTPUT a message to the user and probably INPUT the user's key strokes (for name, ID number, and so on)
    assume that you have your own databases and that you can access them with FETCH commands and save new data with a SAVE command
  3. Bring the sheet to class for discussion--and hand it in afterwards. Should be legible!

General commands you will need to use:

FETCH (for data from your own system)
Syntax: FETCH [what] FROM [database name] IF variable = ??
Example: FETCH "ID" FROM "Personal Data" IF "Name" = "Harvey"
SAVE (for data into your own system)
Syntax: SAVE [what] TO [database name] IF variable = ??
Example: SAVE "NewID" TO "Personal Data" IF "Name" = "Harvey"
TEMPSAVE (just to hold on to something such as input from the keyboard)
Syntax: TEMPSAVE AS [some clear name, e.g., ITEM1, VAR1, etc.]
Example: INPUT FROM Keyboard, TEMPSAVE AS ITEM1
INPUT (for input from somewhere else: tape, cd, web)
Syntax: INPUT FROM [wherever]
Example: INPUT FROM mouse (double click)
OUTPUT (to a screen, printer, external file)
Syntax: OUTPUT TO [wherever]
Example: OUTPUT TO screen "ITEM1"
And to make life easier, one OUTPUT can be a dialog box (e.g., OUTPUT TO dialog box "please enter your password below")
CALC (calculate anything)
DO (some other action you want to perform--try to make it specific)
IF (for a conditional action)
Syntax: IF . . . THEN . . . ELSE . . .
Example: IF "ITEM1" = "ITEM2" THEN OUTPUT TO screen "They're equal" ELSE OUTPUT TO screen "They're different"