Manuals
/
Brands
/
Computer Equipment
/
Printer
/
HP
/
Computer Equipment
/
Printer
HP
SunSoft Pascal 4.0 manual
14
1
14
333
333
Download
333 pages, 615.42 Kb
xiv
Pascal 4.0 User’s Guide
Contents
Pascal 4.0 User’s Guide
Page
Contents
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Figures
Page
Tables
Page
Preface
Operating Environment
Installation
Audience
Organization
Conventions Used in This Guide
Shell Prompts in Command Examples
Related Documentation
README Files
Page
Introduction
Standards
Pascal Compiler
Features
Compatibility
Text Editors
Debuggers
XView Toolkit
Native Language Support
Internationalization
Licensing
Page
Pascal Programs
A Simple Pascal Program
Compiling the Program
Running the Program
Renaming the Executable File
An Interactive Pascal Program
Redirecting I/O
Using a File Name as a File Variable
Where Did My Program Fail
Using a Sample Program with Segmentation Violation
Compiling and Running the Program
Using the -g Option
Page
The Pascal Compiler
pc Version Number
Compile and Link Sequence
Language Preprocessor
File Name Extensions Accepted By pc
Option-Passingon the Command-Line
Option-Passingin the Program Text
Page
Options
–Bbinding
-bsdmalloc
-calign
–cg89
–cg92
-cond
–config
–dalign
-dn
-dryrun
-dy
–fast
-fnonstd
–fns
–fround=r
–ftrap=t
-hname
–help or -flags
-keeptmp
-Ldirectory
-libmieee
–libmil
–misalign
-mt
–native
-nocx
-nolib
–nolibmil
-noqueue
-notrace
Page
–o filename
–p and –pg
–pic, -Kpic and –PIC, -KPIC
–Qoption
–Qpath
–Qproduce
-qp
-Rw
Page
Page
Page
Page
–sb
–sbfast
-tc
–temp=dir
–time
–V0 and –V1
-xa
-xarch=a
Page
Page
Page
-xcache=c
-xchip=c
-xcg89
-xcg92
–xF
-xildoff
-xildon
–xl
-xlibmieee
-xlibmil
-xlibmopt
–xlicinfo
–xMerge
-xnolib
-xnolibmopt
-xpg
-xprofile=p
Page
-xregs=r
–xs
-xsafe=mem
-xsb
-xsbfast
-xspace
-xtarget=t
Page
Page
Page
-ztext
Program Construction and
Management
Units
Using Program Units and Module Units
Compiling with Units
Using Units and Header Files
Sharing Variables Between Units
Page
Page
Libraries
Separate Compilation
Working with Units
Sharing Variables and Routines Across Multiple Units
Compiling without the -xl Option
Sharing Public Variables
Using extern Option to Share Routines
Using include Files to Share Variables and Routines
Page
Using the -xl Option
Using public var Declarations
public var
Page
Using the define Variable Attribute
Using the define Declaration
Using include Files
include
Page
Using extern
Sharing Declarations in Multiple Units
Page
The C–PascalInterface
Compilation of Mixed-LanguagePrograms
Compatibility of Types for C and Pascal
Precautions with Compatible Types
The shortreal Type
The
Character Strings
Array Indexes
Aggregate Types
Incompatibilities
Enumerated Types
General Parameter Passing in C and Pascal
Procedure Calls: C–Pascal
Variable Parameters
Simple Types without –xl
Simple Types with –xl
Strings of Characters
Fixed Arrays
Page
Page
The univ Arrays
Conformant Arrays
Page
Page
Page
Records and Structures
Page
Page
Variant Records
Page
Pascal Set Type
Pascal intset Type
Value Parameters
Page
Arrays
Function Return Values
Simple Types
Input and Output
Procedure Calls: Pascal–C
Page
Page
Page
Page
Page
Page
Page
Page
Page
Non-PascalProcedures
Page
Page
Page
Parameters That Are Pointers to Procedures
Procedures and Functions as Parameters
Global Variables in C and Pascal
File-PassingBetween Pascal and C
Page
Page
The C++–PascalInterface
Sample Interface
Compatibility of Types for C++ and Pascal
C++ Name Encoding
Procedure Calls: C++–Pascal
Arguments Passed by Reference
Simple Types without the -xl Option
Simple Types with the -xl Option
Page
Page
Page
Page
Page
Page
Page
Page
Arguments Passed by Value
Page
Page
Page
Type shortreal
Input and Output
Procedure Calls: Pascal–C++
Simple Types Passed by Reference
Page
Page
Page
Page
Global Variables in C++ and Pascal
Pascal File Pointers to C++
The FORTRAN–PascalInterface
Compiler Mixed-LanguagePrograms
Compatibility of Types for FORTRAN and Pascal
Page
Page
General Parameter-Passingin FORTRAN and Pascal
Procedure Calls: FORTRAN-Pascal
Page
Simple Types with the –xl Option
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Pointers
Page
Procedure Calls: Pascal-FORTRAN
Page
Page
Page
Character Dummy Arguments
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Routines as Parameters
Page
Page
Error Diagnostics
Compiler Syntax Errors
String Errors
Digits in Real Numbers
Replacements, Insertions, and Deletions
Undefined or Improper Identifiers
Expected Symbols and Malformed Constructs
Expected and Unexpected End-of-file
Compiler Semantic Errors
scalar
Scalar Error Messages
Expression Diagnostics
Page
Type Equivalence
Unreachable Statements
goto
Compiler Panics, I/O Errors
Runtime Errors
Page
Page
Page
The XView Toolkit
Overview
Tools
Objects
Object-OrientedProgramming
Pascal Interface
Compiling with Libraries
Header Files
Names
Usage
Attribute Procedures
Attribute Lists
Handles
Data Types
Conversion of C to Pascal
Page
Sample Translation of an XView Function to Pascal
Sample Program
Menu Demo Program
Page
Math Libraries
Contents of the Math Libraries
libm Functions
IEEE Support Functions
ieee_functions()
ieee_values()
ieee_retrospective()
SPARC Libraries
Arithmetic Exceptions
Math Library Exception-HandlingFunction: matherr()
Page
libsunmath Support for IEEE Modes and Exceptions
Page
Page
Pascal Preprocessor
Compiler Directives
The %config Directive
Page
The %debug Directive
The %else Directive
The %elseif Directive
The %elseifdef Directive
Page
The %enable Directive
The %endif Directive
The %error Directive
The %exit Directive
The %if Directive
The %ifdef Directive
The %include Directive
The %list Directive
Page
The %nolist Directive
The %slibrary Directive
The %var Directive
The %warning Directive
Page
Error Messages
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Index