Sunday, March 10, 2019

CASEDMO1

Table of Contents ] [ List of Example Programs ] [ CASEDMO1 Disk Image ]

CASEDMO1 is a short example program (Listing 7-5) that appears on page 92 of the book "Pascal Primer" by David Fox and Mitchell Waite. It demonstrates the use of a CASE statement with a CHAR variable.


The link command looks like:

LINKER V1.0
*D2:CASEDMO1,D2:PEEKPOKE,GRSND,PASLIB/S

When you run the program, it looks like:



Press the (lower case) keyboard key for the first letter in the word from the list. The program responds with an appropriate response.

What starts out as a simple CASE statement example becomes a little more complicated in the Atari Pascal Language System, do to the "READ CHAR" bug and other idiosyncrasies.

The bug handling code is expecting the user input to be in lower case.

No comments:

Post a Comment