Atari Pascal Language System Example Programs

Table of Contents ] [ List of Example Programs ]

Here are some example programs that have been compiled, linked, run, and tested with the March 1982 released version of the Atari Pascal Language System from the Atari Program Exchange.


Examples From "Atari Pascal Version 0.0 Documentation" 


PRIMES - Calculating prime numbers example used for bench marking.
TESTGET - Reading a file from disk, character by character, example.
TESTROL - Reading a file from disk, line by line, example.
TESTGNB - Reading a file from disk, byte by byte, example.


Examples From "Atari Pascal Language System Manual"


PMDEMO - Player/Missile Graphics, Sound, and Joystick example.


Examples From The Book "Pascal Primer" by David Fox and Mitchell Waite


WRITEABI - Simple Pascal program showing program structure and WRITE/WRITELN statements.
CURSORDM - Cursor control on a text screen example.
VARIABLE - Introduces STRING and INTEGER variable types.
INPUTING - Introduces READLN, COMMENTS, and clearing the text screen with CHR.
INPUTEXP - Demonstrates inputting a single character using both READLN and READ.
REVINPUT - Demos PROCEDURES, READLN, COMMENTS, and clearing the text screen.
DUPNAMES - Demonstrates the differences of GLOBAL and LOCAL variables.
PAGING - Demonstrates PROCEDURE reuse and PROCEDURES calling PROCEDURES.
TAXES - Demonstrates nested procedures. One really needs to read the book to make sense of it.
ADDINT1 - Shows how to use a FOR/DO loop in Pascal.
ADDINT2 - Shows User Interaction along with the FOR/DO loop in Pascal.
EXPON1 - Demonstrates how to calculate exponents in Pascal using a FOR loop.
EXPON2 - Shows how to calculate exponents in Pascal using a complex statement in a FOR loop.
LOAN1 - Calculates the regular payment on a loan with the default e-notation output.
LOAN2 - Calculates the regular payment on a loan with decimal formatted output.
ADVANCES - A simulate conversation program that shows IF-THEN-ELSE use.
METRIC1 - A menu driven program to covert from US measurements to Metric.
METRIC2 - Similar to METRIC1. Adds error checking and REPEAT/UNTIL.
CASEDMO1 - Demonstrates a CASE statement using an CHAR variable type.
CASEDMO2 - Demonstrates a CASE statement using an INTEGER variable type.
CASEDMO3 - Tries, but fails to demonstrate a CASE statement using a BOOLEAN variable type.
PARAMDM1 - Demos passing parameters during a procedure call.
PARAMDM2 - Demos that you can't change a passed parameter when passed-by-value.
PARAMDM3 - Demos passing multiple pass-by-value parameters.
TWOWAYC - Demos a pass-by-variable parameter that can be modified in the called procedure.
EMPTYBOX - Demos how to pass an empty, unassigned pass-by-variable parameter.
LOAN3 - Demonstrates the use of a FUNCTION.
BKWDWRIT - Demonstrates how to use a standard Pascal string processing function.
CENTERDM  - Shows how to center text using a standard Pascal string processing function.
NOSPACE - Shows the LENGTH(), POS(), and DELETE() string procedure and functions.
SPACEOUT - Shows the LENGTH() and INSERT() string procedure and functions.
VALDEMO - Attempts to convert a STRING to an INTEGER.
INTCONST - Attempts to convert an INTEGER to a STRING.
STRARRAY - Demonstrates the use of STRING arrays.


Examples From The Book "Introduction to PASCAL (Including UCSD PASCAL) Second Edition Revised" by Rodnay Zaks

GREETINGS - Another simple Hello, World! type program.
FIBONACCI - Shows how to use recursion in a PASCAL program.




Back To Contents Page

No comments:

Post a Comment