Turbo Pascal Borland's No-Nonsense License Statement! This Software Is Protected by Both United States Copyright Law and International Treaty Provisions
Total Page:16
File Type:pdf, Size:1020Kb
Turbo Pascal Borland's No-Nonsense License Statement! This software is protected by both United States copyright law and international treaty provisions. Therefore, you must treat this software just like Q book, with the following single exception. Borland International authorizes you to make archival copies of the software for the sole purpose of backing-up our software and protecting your investment from loss. By saying, "just like a book," Borland means, for example, that this software may be used by any number of people and may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another. Just like a book that can't be read by two different people in two different places at the same time, neither can the software be used by two different people in two different places at the ·same time. (Unless, of course, Borland's copyright has been violated.) Programs that you independently write and compile using the Turbo Pascal language compiler may be used, given away, or sold without additional license orfees. You are not required to indicate that your programs were developed using Turbo Pascal, or that they contain source code provided with Borland language products (toolboxes). The sample programs on the Turbo Pascal diskette provide a demonstration of the various features of Turbo Pascal. They are intended for educational purposes only. Borland I nternational grants you (the registered owner ofTurbo Pascal) the right to edit or modify these sample programs for your own use, but you may not give them away or sell them, alone or as part of any program, in object or source code form. You may, however, incorporate miscellaneous routines from these prograrl}s into your own programs, as long as your resulting program does not substantially duplicate all or part of the sample program in appearance or functionality. WARRANTY With respect to the physical diskette and physical documentation enclosed herein, Borland International, Inc. ("Borland") warrants the same to be free of defects in materials and workmanship for a period of 60 days from the date of purchase. In the event of notification within the warranty period of defects in material or workmanship, Borland will replace the defective diskette or documentation. If you need to retum a product. call the Borland Customer Service Department to obtain a return authorization number. The remedy for breach of this warranty shall be limited to replacement and shall not encompass any other damages, including but not limited to loss of profit. and special, incidental, consequential, or other similar claims. Borland International, Inc. specifically disclaims all other warranties, expressed or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose with respect to defects in the diskette and documentation, and the program license granted herein in particular, and without limiting operation of the program license with respect to any particular application, use, or purpose. In no event shall Borland be liable for any loss of profit or any other commercial damage, including but not limited to special. incidental, consequential or other damages. GOVERNING LAW This statement shall be construed, interpreted, and governed by the laws of the state of California. First Edition Printed in USA 987 Turbo Pascal version 3.0 Reference Manual Copyright ©1983 Copyright ©1984 Copyright ©1985 Copyright ©1986 by BORLAND INTERNATIONAL Inc. 4585 Scotts Valley Drive Scotts Valley, CA 95066 TABLE OF CONTENTS INTRODUCTION ... ........... ........ ....... ........... .... ..... ....... ..................... ......... .... 1 The Pascal Language .............................................................................. 1 TURBO Pascal ... ................................ , ....... ... ....... ..... ............. ....... ........... 1 Structure of This Manual ......................................................................... 2 Typography .............................................................................................. 4 Syntax Descriptions ................................................................................. 4 Chapter 1. USING THE TURBO SYSTEM ......... ..... ......................... ........... 7' .COM and .CMD files ............. , ............ ....... ..... ....... .................. ....... ......... 7 BEFORE USE ............................................................. , ............. ........ ....... 7 IMPORTANT NOTE !!! ............................................................................. 7 Files On The Distribution Disk .................................................................. 8 Starting TURBO Pascal ........................................................................... 10 Installation ............. ........ ............ .............. ......... ....... ......................... ......... 12 IBM PC Screen Installation .... ................. ..................................... ......... 12 Non-IBM PC Screen Installation .. ............ ........ ..................................... 12 Installation of Editing Commands ............ ............................................. 13 The Menu ................................................................................................. 14 Logged Drive Selection ........................................................................ 15 Work File Selection ........................................................... ;................... 15 Main File Selection ............................................................................... 16 Edit Command ...................................................................................... 17 Compile Command .......... ..... ....................... ............. ..................... ....... 17 Run Command ......... ........ .......... .............. .......... .................................. 17 Save Command ........ .................... ............ ............................................ 17 Directory Command ............................................................................. 18 Quit Command ..................................................................................... 18 compiler Options ................................................................................... 18 The TURBO Editor ................................................................................... 19 The Status Line .................................................................................... 19 Editing Commands ............................................................................... 20 A Note on Control Characters .............................................................. 22 Before You Start: How To Get Out ...................................................... 22 Basic Movement Commands. .................. .......... ......................... .......... 22 Extended Movement Commands ......................................................... 25 Insert and Delete Commands ............................................................... 26 Block Commands ......... ....... ........ ............... ............ .... .... .............. ........ 28 Miscellaneous Editing Commands ........................................................ 30 TABLE OF CONTENTS The TURBO editor vs. WordStar .... ...... .......... .............. ........................... 34 Cursor Movement ................................................................................. 34 Mark Single Word ...................................................................... ........... 34 End Edit ................................................................................................ 35 Line Restore ......................................................................................... 35 Tabulator .............................................................................................. 35 Auto Indentation ................................................................................... 35 Chapter 2. BASIC LANGUAGE ELEMENTS ................ ........ ...................... 37 Basic Symbols .......................................................................................... 37 Reserved Words ...................................................................................... 37 Standard Identifiers .................................................................................. 38 Delimiters ................................................................................................. 39 Program Lines .......................................................................................... 39 Chapter 3. STANDARD SCALAR TYPES .. .......... ....................................... 41 Integer ...................................................................................................... 41 Byte .......................................................................................................... 41 Real .......................................................................................................... 42 Boolean .................................................................................................... 42 Char ......................................................................................................... 42 Chapter 4. USER DEFINED LANGUAGE ELEMENTS ....................... ........ 43 Identifiers ................................................................................................