Text preview for : 6172216_BASIC_Compiler_Mar82.pdf part of IBM 6172216 BASIC Compiler Mar82 IBM pc languages 6172216_BASIC_Compiler_Mar82.pdf



Back to : 6172216_BASIC_Compiler_Ma | Home

--- -
- --- - -
- - - ---
- --- -
- - ---
-----
--_.- Personal Computer
Computer Language
Series




BASIC
Compiler
by Microsoft
First Edition Revised (March 1982)

Changes are periodically made to the information herein; these
changes will be incorporated in new editions of this publication.

Products are not stocked at the address below. Requests for copies of
this product and for technical information about the system should
he made to your authorized IBN! Personal Computer Dealer.

A Product Comment Form is provided at the back of this
publication. If this form has been removed, address comment to:
IBNI Corp., Personal Computer, P.O. Box 1328-C, Boca Raton,
Florida 33132. IBJ\;I may usc or distribute any of the information
you supply in any way it believes appropriate without incurring
any obligations whatever.

~-~Copyright International Business l\lachincs Corporation 1982
Preface

How to Use this Book
This book explains what you need to know about the
IBM Personal Computer BASIC Compiler. It is designed
for people who are unfamiliar with the compiler as a
programming tool. Therefore, this book provides both
a step-by-step introduction and a detailed technical guide
to the BASIC Compiler and its use. After a few compila-
tions, you can use this book both as a refresher on
procedures and as a technical reference.

You should have a working knowledge of the BASIC
language to use this book. For reference information on
IBM Personal Computer BASIC, consult the IBM
Personal Computer BASIC manual.


Organization

This book contains the following sections:

Introducing the BASIC Compiler: Gives you an intro-
duction to compilers in general and a comparison of
interpreters and compilers. It also provides brief
descriptions of the contents of the BASIC Compiler
package.

Using the BASIC Compiler: Tells you what you need in
order to use the BASIC Compiler, and some things you
need to do the first time you ever try to compile a
program. It also gives you an overview of program
development with the compiler.

Sample Session: Takes you step by step through the
compiling, linking, and running of a demonstration
program.




111
Creating a Source Program: Describes how to create a
BASIC source program for later compilation, and how
to use the compiler metacommands.

Debugging with the BASIC Interpreter: Describes how
to debug the BASIC source file with the BASIC
interpreter before compiling it. Note that the last
section, "Differences Between the Compiler and
In terpreter," describes differences between the
language supported by the compiler and that
supported by the BASIC interpreter.

Compiling: Describes use of the BASIC Compiler in
detail, including a description of the command line
syntax and the various compiler parameters.

Linking: Describes how to use the linker to link your
compiled programs to the needed library. (Note that
Appendix B of this book contains more detailed
reference material on the linker.)

Running a Program: Describes how to run your final
executable program.

Using a Batch File: Tells how you can use the DOS
Batch command facility to automatically perform the
compile, link, and/or run steps. Sample Batch files are
included.

Differences Between the Compiler and Interpreter:
Describes all of the language, operational, and other
differences between the language supported by the
BASIC Compiler and that supported by the BASIC
in terpreter.

Note: It is important that you study these
differences and make the necessary changes in
your BASIC program before you use the
compiler.

The appendixes contain the error messages and more
detailed technical information.




lV
Syntax Diagrams

The syntax for statements, commands, and functions
in this book is presented in the same format as in the
IBM Personal Computer BASIC manual: