Goals
- Create the MP1PEDIT routine.
- Add the first query.
- Have student add the remaining queries.
Description
- Create a name spaced routine called MP1PEDIT. If the prefix MP1 is OK for your site then use it. Otherwise you will have to change it to your prefix in all routines.
- Read the Global Structure section in the Student Guide.
- Add code that queries for each data element in the Parts record.
- Give each query a label (separate line) using the same name.
- Write the prompt out using the Write command.
- Read the value into the variable X. (Programming exercises will use single letter variables as scratch or work variables.)
- If the user simply hits enter, quit out of the routine.
- If not, set the value of X into a variable with the same name as the query.
- Do not write the syntax checking code at this point. Just make the code drop through to each query.
- The following is an example of the first query for the Part Number.
Code: PNUM ; Part Number Write !,"Part Number: " Read X If X="" Quit Set PNUM=X
- After the last query PSP (ignore PUNAM for the time being – it requires special treatment) loop back and query for the next record.
- Test this shell and make sure it works. To stop execution, simply hit the Control C key.
|