Borland C/C++ Version 3.1 User Guide

Total Page:16

File Type:pdf, Size:1020Kb

Borland C/C++ Version 3.1 User Guide 3.1 USER'S GUIDE • INTEGRATED ENVIRONMENT • OPTIMIZATION • COMMAND·lINE COMPILER • INSTALLATION BORLAND Bar/ana C++ Version 3.1 BORLAND INTERNATIONAL, INC. 1800 GREEN HILLS ROAD P.O. BOX 660001, SCOTTS VALLEY, CA 95067-0001 Copyright © 1991, 1992 by Borland International. All rights reseNed. All Borland products are trademarks or registered trademarks of Borland International, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders. Windows, as used in this manual, refers to Microsoft's implementation of a windows system. PRINTED IN THE USA. Rl 1098765 c o N T E N T s Introduction 1 The I e option ................... 23 What's in Borland C++ ................. 1 The Ih option ................... 23 Hardware and software requirements ... 4 The II option .................... 24 The Borland C++ implementation ....... 4 The 1m option. .. 24 The Borland C++ package . .. 5 The Ip option ................... 24 The User's Guide . .. 5 The Ir option .................... 24 The Tools and Utilities Guide ......... 6 The I s option. .. 24 The Programmer's Guide. .. 7 The I x option ................... 24 The Library Reference ............... 8 Exiting Borland C++ ............... 25 Using the manuals .................... 8 IDE components .. .. 25 Programmers learning C or C++ ...... 9 The menu bar and menus ........... 25 Experienced C and C++ programmers . 9 Shortcuts ....................... 26 Typefaces and icons used in these books . 10 Command sets .................. 26 How to contact Borland . .. 11 Native option ................. 29 Resources in your package .......... 11 Borland C++ windows. .. 30 Borland resources . .. 11 Window management ............ 32 The status line . .. 33 Chapter 1 Installing Borland C++ 13 Dialog boxes' . .. 33 Using INSTALL ..................... 14 Action buttons ................... 34 Protected mode and memory ... ... .. 15 Radio buttons and check boxes .... 34 DPMIINST .. .. .. .. .. .. .. .. ... 15 Input and list boxes .............. 35 DPMIMEM ..................... 16 Configuration and project files . .. 36 DPMIRES . .. 16. The configuratio~ file ............... 36 Extended and expanded memory .. 17 Project files .... '. .. 36 Running BC . .. 18 The project directory ............. 37 Laptop systems . .. 18 Desktop files .................... 37 The README file . .. 18 Changing project files ............ 38 The FILELIST.DOC and HELPME!.DOC Default files ..................... 38 files ................................ 19 The Borland C++ for Windows IDE .... 38 Example programs .................. 19 Starting Borland C++ for Windows . .. 39 Customizing the IDE ................. 19 Command-line options ........... 39 Chapter 2 IDE basics 21 Command sets .................... 39 Starting and exiting the DOS IDE ...... 22 Configuration and project files . .. 41 Command-line options ............. 22 Using the SpeedBar ................ 41' The Ib option ................... 22 Global buttons . .. 42 The I d option ................... 23 Desktop window ............... : 42 Edit windows ................... 42 Go to Cursor ................' ..... 61 Project window .................. 42 Trace Into ........................ 61 Message window ................ 43 Step Over ........................ 62 Arguments ....................... 63 Chapter 3 Menus and options Debugger ........................ 64 reference 45 Debugger Options ................ 64 :: (System) menu ... .. 46 Compile menu ..................... 64 Repaint Desktop ................... 46 Compile ......................... 64 Transfer items ..................... 46 Make ............................ 65 File menu . .. 47 Link ............................. 65 New ............................. '47 Build ............................ 65 Open ............................. 47 Information ...................... 66 Using the File list box ............... 48 Remove Messages ................. 66 Save .............................. 49 Debugmenu ....................... 66 Save As ........................... 49 Qualifying expressions ............ 67 SaveAll .......................... 49 Inspect .......................... 68 Change Dir ....................... 50 Ordinal Inspector windows ...... 69 Print ............................. 51 Pointer Inspector windows ....... 69 Printer Setup ...................... 51 Array Inspector windows ........ 70 DOS Shell . .. 51 Structure and Union Inspector Exit .............................. 52 windows ...................... 70 Closed file listing .................. 52 Function Inspector windows ..... 71 Edit menu .......................... 52 Class Inspector windows ......... 71 Undo ............................. 53 Constant Inspector window ...... 71 Redo ............................. 53 Type Inspector window .......... 71 Cut .............................. 54 Evaluate/Modify ................. 71 Copy ............................. 54 Call Stack ........................ 73 Paste .................... ',' ., ..... 54 Watches ......................... 75 Clear ............................. 54 Add Watch ..................... 75 Copy Example . .. 55 Delete Watch ................... 75 Show Clipboard ................... 55 EditWatch ..................... 75 Search menu ........................ 56 Remove All Watches ............ 76 Find .............................. 56 Toggle Breakpoint ................ 76 Replace ........................... 58 Breakpoints ...................... 76 Search Again ...................... , 58 Project menu ....................... 78 Go to Line Number ................ 59 Open Project ..................... 78 Previous Error . .. 59 Close Project ..................... 79 Next Error ........................ 59 Add Item ........................ 79 Locate Function .................... 59 Delete Item ...................... 79 Runmenu ......................... 59 Local Options .................... 79 Run ............................. 59 Include Files ..................... 81 Source code the same ............ 60 Browse menu ....................... 81 Sou~ce code modified ............ 60 Classes .......................... 82 Program Reset .................... 61 Functions ........................ 82 Variables ......................... 83 Size/Move . .. 124 Symbols .......................... 83 Zoom ........................... 124 Rewind ........................... 83 Tile ............................. 124 Overview .. .. 83 Cascade ......................... 125 Inspect ........................... 84 Arrange Icons .................... 125 Goto ............................. 84 Next ............................ 125 Options menu ....................... 84 Close ............................ 125 The Set Application Options dialog Close All . .. 125 box .............................. 84 Message ......................... 125 Compiler ......................... 86 Output .......................... 126 Code Generation . .. 86 Watch ........................... 126 Advanced Code Generation ...'.... 89 User Screen ...................... 127 Entry /Exit Code ................. 91 Register ......................... 127 C++ Options .................... 93 Project. .. .. 127 Advanced C++ Options. .. 95 Project Notes .. .. 127 Optimizations ................... 97 List All .......................... 127 Source ......................... 100 Help menu . .. 128 . Messages. .. 100 Contents . .. 129 Names ........................ 102 Index ............................ 129 Transfer ......................... 102 Topic Search ..................... 129 Transfer macros ................ 104 Previous Topic ................... 130 Make ............................ 104 Help on Help . .. 130 Linker ........................... 106 Active File ....................... 130 Settings . .. 106 About ........................... 130 Libraries ....................... 108 Chapter 4 Managing multi-file Librarian ........................ 110 Debugger ........................ 110 projects 131 Directories ....................... 113 Sampling the Project Manager ........ 132 Resources . .. 114 Error tracking. .. 135 Environment ..................... 114 Stopping a make . .. 135 Preferences ..................... 114 Syntax errors in multiple source files . 135 Editor ......................... 116 Saving or deleting messages . .. 136 Highlight ...................... 118 Autodependency checking ......... 137 Coloring your text ............ 118 Using different file translators ........ 138 Using the Windows system Changing translator options ... .. 138 colors ....................... 119 Changing file translators ..... .. 139 Changing text attributes ....... 119 Assigning a new file translator . .. 139 Desktop ....................... 121 Using the Project Manager to build Startup ........................ 121 Windows applications .. .. 140 Colors ......................... 123 Overriding libraries ................. 141 Save ............................. 123 More Project Manager features ....... 141 Window menu ..................... 124 Looking at files in a project ......... 143 Notes for your project ............. 143 iii Chapter 5 The command-line com- A closer look at the Borland C++ piler 145 Optimizer. .. 182 Using the command-line compiler ..... 145 Global register allocation. .. 182 DPMIINST . .. 146 Dead-code elimination. .. 182 Running BCC .................... 146 Common subexpression Using the options ................. 146 elimination ..................... 183 Option-precedence rules ......... 147 Loop invariant code motion
Recommended publications
  • Using Gtkada in Practice
    143 Using GtkAda in Practice Ahlan Marriott, Urs Maurer White Elephant GmbH, Beckengässchen 1, 8200 Schaffhausen, Switzerland; email: [email protected] Abstract This article is an extract from the industrial presentation “Astronomical Ada” which was given at the 2017 Ada-Europe conference in Vienna. The presentation was an experience report on the problems we encountered getting a program written entirely in Ada to work on three popular operating systems: Microsoft Windows (XP and later), Linux (Ubuntu Tahr) and OSX (Sierra). The main problem we had concerned the implementation of the Graphical User Interface (GUI). This article describes our work using GtkAda. Keywords: Gtk, GtkAda, GUI 1 Introduction The industrial presentation was called “Astronomical Ada” because the program in question controls astronomical telescopes. 1.1 Telescopes The simplest of telescopes have no motor. An object is viewed simply by pointing the telescope at it. However, due to the rotation of the earth, the viewed object, unless the telescope is continually adjusted, will gradually drift out of view. To compensate for this, a fixed speed motor can be attached such that when aligned with the Earth’s axis it effectively cancels out the Earth’s rotation. However many interesting objects appear to move relative to the Earth, for example satellites, comets and the planets. To track this type of object the telescope needs to have two motors and a system to control them. Using two motors the control system can position the telescope to view anywhere in the night sky. Our Ada program (SkyTrack) is one such program. It can drive the motors to position the telescope onto any given object from within its extensive database and thereafter Figure 1 - SkyTrack GUI follow the object either by calculating its path or, in the The screen shot shown as figure 1 shows the SkyTrack case of satellites and comets, follow the object according to program positioning the telescope on Mars.
    [Show full text]
  • Embrace and Extend Approach (Red Hat, Novell)
    Integrated Development Environments (IDEs) Technology Strategy Chad Heaton Alice Park Charles Zedlewski Table of Contents Market Segmentation.............................................................................................................. 4 When Does the IDE Market Tip? ........................................................................................... 6 Microsoft & IDEs ................................................................................................................... 7 Where is MSFT vulnerable?................................................................................................. 11 Eclipse & Making Money in Open Source........................................................................... 12 Eclipse and the Free Rider Problem ..................................................................................... 20 Making Money in an Eclipse World?................................................................................... 14 Eclipse vs. Microsoft: Handicapping the Current IDE Environment ................................... 16 Requirements for Eclipse success......................................................................................... 18 2 Overview of the Integrated Development Environment (IDE) Market An Integrated Development Environment (IDE) is a programming environment typically consisting of a code editor, a compiler, a debugger, and a graphical user interface (GUI) builder. The IDE may be a standalone application or may be included as part of one or more existing
    [Show full text]
  • VERSION 2.0 Referene MANUAL
    VERSION 2.0 REFERENe MANUAL BORlAnD INTERNATIONAL Borland International 4113 Scotts Valley Drive Scotts Valley, California 95066 Copyright Notice© This software package and manual are copyrighted 1983, 1984 by BORLAND INTERNATIONAL Inc. All rights reserved worldwide. No part of this publication may be reproduced, transmitted, transcribed, stored in any retrieval system, or translated into any language by any means without the express written per­ mission of BORLAND INTERNATIONAL Inc., 4113 Scotts Valley Drive, Scotts Valley, CA 95066, USA. Single CPU License The price paid for one copy of TURBO Pascal licenses you to use the product on one CPU when and only when you have signed and returned the License Agreement printed in this book. Disclaimer Borland International makes no warranties as to the contents of this manual and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Borland International further reserves the right to make changes to the specifications of the program and contents of the manual without obligation to notify any person or organization of such changes. Fifth edition, October 1984 Printed in the United States of America 98765 TABLE OF CONTENTS INTRODUCTION ............................................. 1 The Pascal Language .........................................1 TURBO Pascal ..............................................1 Structure of This Manual ..................................... 2 Typography ............................................... 3 Syntax Descriptions
    [Show full text]
  • M-Explorer User's Guide
    Table of Contents M-Explorer User’s Guide Table of Contents M-Explorer User’s Guide..............................................1 Chapter 1 Using This Guide.................................................................1-1 Introduction...................................................................................................... 1-1 Key Concepts................................................................................................... 1-2 Chapter Organization .....................................................................................................1-2 Online Help ....................................................................................................................1-2 Manual Conventions ......................................................................................................1-2 Chapter 2 Introduction to M-Explorer .................................................2-1 Introduction...................................................................................................... 2-1 Key Concepts................................................................................................... 2-2 System Component Interaction......................................................................................2-2 OPC Data Access Servers.............................................................................................2-2 M-Inspector ....................................................................................................................2-2 M-Password ...................................................................................................................2-3
    [Show full text]
  • 2. Assembly Language Assembly Language Is a Programming Language That Is Very Similar to Machine Language, but Uses Symbols Instead of Binary Numbers
    2. Assembly Language Assembly Language is a programming language that is very similar to machine language, but uses symbols instead of binary numbers. It is converted by the assembler into executable machine- language programs. Assembly language is machine-dependent; an assembly program can only be executed on a particular machine. 2.1 Introduction to Assembly Language Tools Practical assembly language programs can, in general, be written using one of the two following methods: 1- The full-segment definition form 2- The simplified segment definition form In both methods, the source program includes two types of instructions: real instructions, and pseudo instructions. Real instructions such as MOV and ADD are the actual instructions that are translated by the assembler into machine code for execution by the CPU. Pseudo instructions, on the other hand, don’t generate machine code and are only used to give directions to the assembler about how it should translate the assembly language instructions into machine code. The assembler program converts the written assembly language file (called source file) into machine code file (called object file). Another program, known as the linker, converts the object file into an executable file for practical run. It also generates a special file called the map file which is used to get the offset addresses of the segments in the main assembly program as shown in figure 1. Other tools needed in assembling coding include a debugger, and an editor as shown in figure 2 Figure 2. Program Development Procedure There are several commercial assemblers available like the Microsoft Macro Assembler (MASM), and the Borland Turbo Assembler (TASM).
    [Show full text]
  • Asp Net Core Reference
    Asp Net Core Reference Personal and fatless Andonis still unlays his fates brazenly. Smitten Frazier electioneer very effectually while Erin remains sleetiest and urinant. Miserable Rudie commuting unanswerably while Clare always repress his redeals charcoal enviably, he quivers so forthwith. Enable Scaffolding without that Framework in ASP. API reference documentation for ASP. For example, plan content passed to another component. An error occurred while trying to fraud the questions. The resume footprint of apps has been reduced by half. What next the difference? This is an explanation. How could use the options pattern in ASP. Net core mvc core reference asp net. Architect modern web applications with ASP. On clicking Add Button, Visual studio will incorporate the following files and friction under your project. Net Compact spare was introduced for mobile platforms. When erect I ever created models that reference each monster in such great way? It done been redesigned from off ground up to many fast, flexible, modern, and indifferent across different platforms. NET Framework you run native on Windows. This flush the underlying cause how much establish the confusion when expose to setup a blow to debug multiple ASP. NET page Framework follows modular approaches. Core but jail not working. Any tips regarding that? Net web reference is a reference from sql data to net core reference asp. This miracle the nipple you should get if else do brought for Reminders. In charm to run ASP. You have to swear your battles wisely. IIS, not related to your application code. Re: How to reference System. Performance is double important for us.
    [Show full text]
  • Parallel Rendering Graphics Algorithms Using Opencl
    PARALLEL RENDERING GRAPHICS ALGORITHMS USING OPENCL Gary Deng B.S., California Polytechnic State University, San Luis Obispo, 2006 PROJECT Submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in COMPUTER SCIENCE at CALIFORNIA STATE UNIVERSITY, SACRAMENTO FALL 2011 PARALLEL RENDERING GRAPHICS ALGORITHMS USING OPENCL A Project by Gary Deng Approved by: __________________________________, Committee Chair John Clevenger, Ph.D. __________________________________, Second Reader V. Scott Gordon, Ph.D. ____________________________ Date ii Student: Gary Deng I certify that this student has met the requirements for format contained in the University format manual, and that this project is suitable for shelving in the Library and credit is to be awarded for the Project. __________________________, Graduate Coordinator ________________ Nikrouz Faroughi, Ph.D. Date Department of Computer Science iii Abstract of PARALLEL RENDERING GRAPHICS ALGORITHMS USING OPENCL by Gary Deng The developments of computing hardware architectures are heading in a direction toward parallel computing. Whereas better and faster CPUs used to mean higher clock rates, better and faster CPUs now means more cores per chip. Additionally, GPUs are emerging as powerful parallel processing devices when computing particular types of problems. Computers today have a tremendous amount of varied parallel processing power. Utilizing these different devices typically means wrestling with varied architecture, vendor, or platform specific programming models and code. OpenCL is an open-standard designed to provide developers with a standard interface for programming varied (heterogeneous) parallel devices. This standard allows single source codes to define algorithms to solve vectorized problems on various parallel devices on the same machine. These programs are also portable.
    [Show full text]
  • Adapting MSP to Microsoft C++ ©James T. Smith, 1999 1. Introduction A. General Comments I. Purpose
    Adapting MSP to Microsoft C++ ©James T. Smith, 1999 1. Introduction a. General comments i. Purpose (1) MSP was developed in a PC environment with the original version of Borland C++, then adapted in several stages to Version 5.0, the standard for this book. Many readers, however, prefer to or must use a different compiler. The environment most frequently mentioned that is somewhat close to the book’s is Microsoft’s. This file describes my adaptation of MSP as a suite of Microsoft Visual C++ Win32 Console Applications. (2) It’s an adaptation guide, not a completed product. Most MSP features described in this book work under the adaptation, but it has not been used for further development. With it, you can see how these features work in your Microsoft environment. To use it for a major project, however, you’ll probably want to select only the appropriate MSP modules. You’ll need to test the adaptation much more thoroughly, and probably add minor cor- rections as needed by your specific application. ii. Major differences (1) Microsoft’s complex mathematics module is implemented with templates. That adds more levels of implicit conversions for the compiler to consider when resolving overloaded function declarations. Many more ambiguities would result, and some methods MSP uses to resolve them would no longer work. This would cause so many changes that you’d lose sight of the rest. So the adaptation contains a completely rewritten complex module. (2) Microsoft handles hardware faults, such as overflow detected by the floating-point processor, by throwing“structured exceptions”.
    [Show full text]
  • Iwork '08 Getting Started (Manual)
    Overview of iWork Tools All three iWork applications share many of the same tools. The Toolbar and Format Bar At the top of each application window, the toolbar provides controls for common tasks. Each toolbar is described in detail in the appropriate chapter in this book. You can customize the toolbar so that it contains the tools you use most often. To customize the toolbar: m Choose View > Customize Toolbar. The toolbar at the top of each window provides controls for common tasks. The Format Bar provides additional formatting tools. The Format Bar provides quick access to commonly used tools for formatting objects. If the Format Bar isn’t visible beneath the toolbar, click View in the toolbar and choose Show Format Bar to show it. 16 Preface Welcome to iWork ’08 The Inspector Window You can format all elements of your document using the panes of the Inspector window. The Inspector panes are described in detail in the user’s guides. To open the Inspector window: m Click Inspector (a blue i) in the toolbar. Click the buttons along the top to see the different Inspector panes. You can have more than one Inspector window open at a time. To open another Inspector window: m Choose View > New Inspector, or Option-click one of the buttons at the top of the Inspector window. Preface Welcome to iWork ’08 17 To see what a control does, rest the pointer over it until its help tag appears. The Media Browser This window provides quick access to all the files in your iTunes library, your iPhoto library, your Aperture library, and your Movies folder.
    [Show full text]
  • 2D Scrolling Background in Unity When Creating a Scrolling
    2D Scrolling Background in Unity When creating a scrolling background image you will use something called a Quad and convert the Sprite into a Material. This works only if the background is designed to be scrollable. The general steps are: A. Create a new Project or use an existing project. B. Import the background sprite into the project C. Convert the Sprite into a Material D. Add a Quad 3D object and resize this object to match the background and set the Material Filtering E. Resize the Camera F. Add a Scrolling Script to the Quad 1. Download the scrolling backgrounds folder that contains some background images (see link for lecture). This will contain three images, a city background image (1230x600), a space background (1782x600) and a trees background (1100x405) 2. Start Unity and choose New to create a new Project. 3. Name the project Scrolling Background and select the 2D option. 4. Create the Project. 5. In the Assets folder create two new folders named Sprites and Scripts. 6. Drag these three background images into the sprites folder. 7. Click the scrolling city background image in the Sprites folder. The Inspector window shows the properties: You are going to change the Texture Type and the Wrap mode. 8. Set the Texture Type to Default and the Wrap Mode to Repeat. 9. Scroll down in the Inspector window and click the Apply button. 10. Repeat these steps for the other two sprites. 11. Click the Game Object menu, choose 3D, and choose Quad: You want to resize the quad object so it matches the background.
    [Show full text]
  • Experience Report Swiss Ada Event 2017 White Elephant Gmbh
    Astronomical Ada Experience Report Swiss Ada Event 2017 White Elephant GmbH Ada Event 2017 - Astronomicial Ada White Elephant GmbH 1 Experience report on the problems we encountered geng a program wriCen enDrely in Ada to work on three popular PC operang systems: • Windows (WinXp and later) • Linux (Ubuntu Tahr) • OSX (Sierra) Ada Event 2017 - Astronomicial Ada White Elephant GmbH 2 Why Astronomical Ada? Because the program in quesDon controls astronomical telescopes Ada Event 2017 - Astronomicial Ada White Elephant GmbH 3 Background: Whatever you are watching will gradually driX out of view due to the rotaon of the • No Motor Earth When aligned with the Earth’s axis cancels out the driX due to the Earth’s rotaon. • One Motor But some objects move relave to the Earth : Eg. Planets, Comets & Satellites Needs a control system • Two Motors To know what to follow and how to follow it Ada Event 2017 - Astronomicial Ada White Elephant GmbH 4 Star Database What is in the night sky and where SkyTrack Motor Stellarium Control program Controller wriCen in Ada Open source PC A method to control Planetarium telescope motors GUI So it can be told where to go and what to follow Ada Event 2017 - Astronomicial Ada White Elephant GmbH 5 Ada Event 2017 - Astronomicial Ada White Elephant GmbH 6 Originally wriCen for MS-Windows Could it be ported to other operang systems? Majority of code and know-how is not operang system specific so why limit ourselves to Windows? Ada Event 2017 - Astronomicial Ada White Elephant GmbH 7 Should be easy • Tasks are part of the Ada language (doesn’t use OS specific libraries to create threads and protected objects) • Compilers for Windows, Linux and OSX • What the language doesn’t supply is mostly provided by packages that have been implemented on various plaorms.
    [Show full text]
  • AIM104-Software Library
    2192-09193-000-000 AIM104-Software Library Software A Utility Disk is supplied with your AIM104. It contains a host of software utilities designed specifically for each AIM104. Please refer to the README.TXT file on the disk for further information. It also includes a test program EXAMP-01.EXE which may be used to confirm access to the board. Introduction Arcom Control Systems produces a complete range of high quality Input/Output (I/O) cards for the PC104 bus. In order to support these I/O cards as fully as possible a complimentary set of high quality software support products is also available. This software library forms part of the software support. This software support has been developed to support Borland C++ versions 3.1 and 4.52, running on 386 CPUs, Pentium CPUs and Arcom Target boards, in both DOS and Windows operating systems. It is presented to the user in the form of standard static library files. This library can then be incorporated into custom application code giving the user all the software facilities needed to use all the hardware features included on an Arcom PC104 I/O card. This manual contains the basic details of what is contained within this library. For a more detailed description please read the Word 2.0 file genman.doc contained in the DOCS sub-directory of the installation disk or in the DOCS sub-directory of the directory you install to. The list below shows the boards supported within the scope of this library. All commonly used modules are listed, however those that fall outside this list are not supported within this software library.
    [Show full text]