.input(u~) .margin(r66) .option(r+ f+ u+ j30) .paragraph(f& p4 s1 k1) .form( [ t #62 e / s // l53 /// #33 '- ' pn:1 ' -' /// ] ) & & .tit Pascal-2 V2.0/RT-11 Introduction .opt(l-r-) ~PASCAL-2 V2.0/RT-11 INTRODUCTION~ .opt .ski 3 Pascal-2 is a transportable multi-pass compiler that emphasizes conformance to the Pascal standard while generating optimized code. Properly used, Pascal-2 will allow programs to be transported between computer systems with a minimum of change. The compiler itself has already been installed on computers made by two different manufacturers, and it is currently being implemented on two others. & Developed over several years, Pascal-2 grew out of our experience with Oregon Software's first Pascal compiler, Pascal-1. Pascal-1 is a one-pass compiler specific to the PDP-11 series, with low-level extensions giving the programmer control over the PDP-11 hardware and operating system. Pascal-2 is larger and compiles more slowly than Pascal-1, but Pascal-2 produces code that is much shorter and faster than Pascal-1 code. Typical programs are 30 to 40 percent smaller and up to twice as fast. & This user manual contains all the information you need to install and operate the Pascal-2 system on Digital's RT-11 operating systems: RT-11 V3 and V4, SJ, XM, and TSX-Plus by S & H Computing. & The first section is the User's Guide, which serves as a quick overview of Pascal-2, to give you a feel for how it works. The guide, which is written on a beginner's level, takes you through the basic steps of compiling, correcting, and running a Pascal-2 program. The User's Guide also has brief explanations and examples of the Debugger, the Profiler, and the extended-precision format for "real" numbers - the standard features of the Pascal-2 system. & The Programmer's Guide contains detailed descriptions of compilation commands, embedded and low-level switches, and the low-level interface between Pascal-2 and the PDP-11 operating system. The Programmer's Guide also contains a miscellaneous collection of articles on implementation-related problems, divided into two broad categories: error situations (and what to do about them), and implementation notes. Finally, the guide describes Pascal-2's optimizations, and it lists all of Pascal-2's error messages. & The Language Specification describes Pascal-2's language features in detail. Because not everyone is familiar with the major changes in the language since Jensen and Wirth's User Manual and Report in 1978, the Language Specification begins by summarizing those changes and describing the ways that Pascal-2 deals with them. Thus, the guide serves not only as a description of our implementation of Pascal but also as a review of the language's evolution since 1978. & The Debugger Guide and the Utilities Guide describe programs designed to improve the usefulness of the Pascal-2 system or to alleviate the tediousness of programming. The Debugger helps you find and correct errors that cannot be caught at compile time. The Utilities package contains program formatters, a text formatter, cross-reference programs, an execution profiler, a package that helps you to interface MACRO-11 routines with Pascal-2 programs, and a dynamic string package. Each utility is described in detail, with examples. & The Conversion Guide, geared toward present Pascal-1 users, explains specific language differences between Pascal-1 and Pascal-2 and the practical programming problems created by the differences. The guide describes the use of the CONVRS utility to help you isolate areas in your Pascal-1 program that will have to be modified to convert to Pascal-2; the guide then details the steps required to convert the programs. The section concludes with a list of solutions to errors that you may encounter while completing the conversion to Pascal-2. & The Installation Guide describes the steps required to install Pascal-2 in your operating system. & This Pascal-2 manual assumes that you have a basic familiarity with the Pascal language. Some sections, such as the Programmer's Guide and the Language Specification, assume a relatively detailed working knowledge of the language. Beginners can make their way carefully through this manual, but we encourage them to read the books described in the next section. & .ski 3 & .pag 4 .sub For More Information ~FOR MORE INFORMATION~ .ski 2 We suggest several places to find more information about Pascal: .mar(l5) & .und 5 (1) Try it! Certainly the most challenging course, and the most open-ended and accurate as well. Acquire the habit of answering your questions by experiment. Remember, "You can't hurt the computer!" & .und 5 (2) Oh! Pascal, by Doug Cooper and Mike Clancy - an easy-to-read Pascal course for the novice programmer. & .und 5 (3) Programming in Pascal, by Peter Grogono - a good course in standard Pascal, with lots of sample programs for (1), above. & .und 5 (4) Pascal User Manual and Report, by Kathleen Jensen and Niklaus Wirth - the first definition of standard Pascal. & .und 5 (5) This manual - a description of the fine points and grubby details concerning Pascal-2. .mar & For the serious student, these books are available from Oregon Software and elsewhere: & .mar(l5) & .und 5 Algorithms + Data Structures = Programs, Niklaus Wirth; Prentice-Hall, $20.25 .mar & .mar(l5) & .und 5 Structured Programming, Dahl, Dijkstra, Hoare; Academic Press, $15.30 .mar & .mar(l5) & .und 5 Elements of Programming Style, Kernighan and Plauger; McGraw-Hill, $3.95 .mar & .mar(l5) & .und 5 Systematic Programming: An Introduction, Niklaus Wirth; Prentice-Hall, $17.75 .mar & And we recommend that you join the Pascal Users' Group, which publishes an excellent newsletter. Send $10 for a one-year subscription to: & .ski 1 .opt(f-) Pascal Users' Group Attn: Rick Shaw P.O. Box 888524 Atlanta, Georgia 30338 (404) 252-2600 & .pag 4 .opt & .ski 3 & .pag 4 .sub Support Policy ~SUPPORT POLICY~ .ski 2 The license fee for your Pascal-2 system includes one year of software support, which covers the following: .mar(l5) & .und 5 1) Telephone assistance. We'll provide a quick cure to your problem if at all possible. & .und 5 2) Formal, written response to all problems, suggestions, and comments received in writing. For complex problems, we need written descriptions of your technical problem to ensure correct diagnosis and repair. (This service does not include applications consultation.) & .und 5 3) A no-cost update to the latest revision of Pascal-2, upon the written request of your Designated Contact Person. This is the standard response to bugs that have been fixed. (A handling fee is levied for some media; no charge for magtape and floppies.) & .und 5 4) The Oregon Software Pascal Newsletter, which contains status reports on all of our Pascal products, announcements of new versions of software and new products, and various technical articles. .mar & Support may be renewed annually. & Customers of an Oregon Software distributor will receive the Newsletter directly from us but should contact their distributor for other elements of support. & .ski 3 & .pag 4 .sub A Note on Style ~A NOTE ON STYLE~ .ski 2 This manual uses the following conventions: & .mar(l10) & .und 10 Text: Sentence punctuation goes outside all quoted material. Pascal reserved words, predefined symbols and directives are in bold face typewriter type: "begin", "write". Program or system names are in upper case typewriter: "ROTAT.PAS", "PROFIL.OBJ". Commands are in typewriter: "$FPP", "/LIST". .mar & .mar(l10) & .und 10 Program Examples: Commands that you should type are in bold face typewriter: ~RUN EX~. These commands assume a carriage return at the end. .mar & .mar(l10) & .und 10 Program Listings: Pascal-2 accepts any combination of upper-case and lower-case characters; for consistency, the examples have Pascal words in lower case and have user-defined words with an initial capital letter and other capitalization as needed for readability, as shown in this program fragment: .ski 1 .mar & .pag 4 .mar(l5 r80) .opt(f-) procedure Show; begin SomeUserAction; writeln(Result); end; & .pag 4 .opt .mar .ski 1 & .ski 3 & .pag 4 .sub Who Are We, Anyway? ~WHO ARE WE, ANYWAY?~ .ski 2 Oregon Software traces its origins to the real OMSI - the Oregon Museum of Science and Industry. OMSI is a private educational organization chartered "to further the education of the youth of the community", and it was in the Research Laboratory at OMSI that we began writing software. Seven of us came from OMSI to found Oregon Software in September, 1977. Because of the close association, the name "OMSI" stayed with us for a while, and we continue to support OMSI and its educational programs. & But please, we're Oregon Software. We're a software research and development corporation in Portland, with a nice view of Mount Hood (and what's left of Mount St. Helens!) The seven from OMSI (the museum) have grown into twenty-five from all over. & On a serious note: OMSI is a non-profit, charitable institution. Contributions of money and equipment are much needed and are tax-deductible. The Research Lab supports independent science projects in many fields, including computing. For further information about the OMSI Research Lab program, contact: & .ski 1 .opt(f-) Director of Research Oregon Museum of Science and Industry 4015 SW Canyon Road Portland, Oregon 97201 (503) 248-5943 & .pag 4 .opt & .ski 3 & .pag 4 .sub And Finally . . . ~AND FINALLY . . . ~ .ski 2 Oregon Software plans to continually improve its written materials. Please send any suggestions in writing to: & .ski 1 .opt(f-) Collins Hemingway Documentation Editor Oregon Software 2340 SW Canyon Road Portland, Oregon 97201 & .pag 4 .opt &