[ Table of Contents ] [ List of Example Programs ] [ INTCONST Disk Image ]
INTCONST is an example program (Listing 9-9) from page 122 of the book "Pascal Primer" by David Fox and Mitchell Waite.
The program takes an INTEGER and attempts to convert it to a STRING. It is the opposite of the VALDEMO example program. It doesn't take any input from the user. It uses the predefined value MAXINT (32767) and converts it to a STRING. This program makes use of the string INSERT procedure. It also uses the ABS function. Since the Atari Pascal built-in ABS() function is buggy, I overrode it with my own simple ABS() function.
The link command looks like:
LINKER V1.0
*D2:INTCONST,PASLIB/S
When you run the program, it looks like:
Showing posts with label INSERT. Show all posts
Showing posts with label INSERT. Show all posts
Friday, March 15, 2019
Wednesday, March 13, 2019
SPACEOUT
[ Table of Contents ] [ List of Example Programs ] [ SPACEOUT Disk Image ]
SPACEOUT is an example program (Listing 9-6) on page 117 of the book "Pascal Primer" by David Fox and Mitchell Waite.
This example program shows how to use intrinsic Pascal STRING functions and procedures. The LENGTH() function returns the number of characters in a string. The INSERT() procedure will insert a string into another string.
SPACEOUT is an example program (Listing 9-6) on page 117 of the book "Pascal Primer" by David Fox and Mitchell Waite.
This example program shows how to use intrinsic Pascal STRING functions and procedures. The LENGTH() function returns the number of characters in a string. The INSERT() procedure will insert a string into another string.
The link command looks like:
LINKER V1.0
*D2:SPACEOUT,PASLIB/S
When you run the program, it looks like:
Subscribe to:
Posts (Atom)