Tuesday, March 12, 2019

CENTERDM

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

CENTERDM is an example program (Listing 9-2) on page 113 of the book "Pascal Primer" by David Fox and Mitchell Waite.

The example shows how to use a standard Pascal string processing procedure or function, specifically, the LENGTH() function, with returns an INTEGER that represents the length or number of characters in a string. It will center text on the screen. I modified this Atari Pascal version to use a screen size of 38 rather than 40 do to the default 2 space indentation.


While we include a reference to the STRPROCS INCLUDE FILE the source code file, it doesn't need to be included in the linker command.

The link command looks like:

LINKER V1.0
*D2:CENTERDM,PASLIB/S

When you run the program, it looks like:


No comments:

Post a Comment