DATA TYPES CONVERSION Programmer's Guide : COPYRIGHT NOTICE [ DATA TYPES CONVERSION Programmer's Guide ] MPE/iX 5.0 Documentation
DATA TYPES CONVERSION Programmer's Guide
Product 900 Series HP 3000 Computer Systems
DATA TYPES CONVERSION
Programmer's Guide
HP Part No. 32650-90015
Printed in U.S.A.
Printed Oct 1989
Edition Second Edition
E1089
________________________________________________________________________
|The information contained in this document is subject to change |
|without notice. |
| |
|HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS |
|MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard |
|shall not be liable for errors contained herein or use of this |
|material. |
| |
|Hewlett-Packard assumes no responsibility for the use or reliability |
|of its software on equipment that is not furnished by Hewlett-Packard.|
| |
|This document contains proprietary information which is protected by |
|copyright. All rights are reserved. No part of this document may be |
|photocopied, reproduced, or translated to another language without the|
|prior written consent of Hewlett-Packard Company. |
________________________________________________________________________
Copyright Æ 1989 by Hewlett-Packard Company
Print History
The following table lists the printings of this document, together with
the respective release dates for each edition. The software version
indicates the version of the software product at the time this document
was issued. Many product releases do not require changes to the
document. Therefore, do not expect a one-to-one correspondence between
product releases and document editions.
Edition Date Software Version
---------------------------------------------------------------------------------------
First Edition November 1987 A.01.00
Update 1 July 1988 A.10.00
Second Edition October 1989 A.30.00
Documentation Map
Preface
The Data Types Conversion Programmer's Manual is intended for MPE XL
programmers who are experienced in one or more high-level programming
languages. The purpose of the manual is to help the programmer who needs
to receive and pass data across languages or programming environments.
This guide is part of the Programmer Series. Other manuals in the series
are depicted in the documentation map at the front of the manual. The
manuals for specific programming languages may be useful as well; the
most common are listed below:
* HP Business BASIC/XL Reference Manual (32715-90001).
* HP C Programmer's Guide (92434-90002), HP C Reference Manual
(92434-90001), HP C/XL Reference Manual Supplement (31506-90001), and
HP C/XL Library Reference Manual Supplement (30026-90001).
* HP COBOL II/XL Programmer's Guide (31500-90002) and COBOL II
Reference Manual (31500-90001) and COBOL II/XL Reference Manual
Supplement (31500-90005).
* HP FORTRAN 77/XL Reference Manual (31501-90010) and HP FORTRAN 77/XL
Programmer's Guide (31501-90011).
* HP Pascal Reference Manual (31502-90001) and HP Pascal Programmer's
Guide (31502-90002).
* HP RPG/XL Programmer's Guide (30318-90001) and HP RPG Reference
Manual (30318-90003).
Compiler Library/XL Reference Manual (32650-90029) may also be useful.
Chapter 1, Introduction, gives an overview of the manual and of the topic
of data types, their format, storage, and conversion. It explains what
primitive data types are recognized by MPE XL and its subsystems, why
data conversion may be necessary, and the differences in data
representation between the Native Mode and Compatability Mode programming
environments in MPE XL.
Chapter 2, Formatting Data Types, presents the formats of the various
data types supported on MPE XL and its subsystems. Bit formats are
pictured, field boundaries given, and formatting conventions explained.
A table compares the correspondence of primitive data types across system
intrinsics and programming languages.
Chapter 3, Converting Data Types, takes each of the primitive data types,
one by one, and gives some suggestions for converting to each of the
other data types.
Appendix A, ASCII and EBCDIC Code Values, shows the character code values
with their decimal, octal, and hexadecimal equivalents.
It would be most useful to skim the entire manual once, then look up
specific topics as needed. The Table of Figures lists the various bit
format maps. Look at the Table of Contents, Table of Tables, and index
for other specific topics.
Conventions
UPPERCASE In a syntax statement, commands and keywords are
shown in uppercase characters. The characters must
be entered in the order shown; however, you can enter
the characters in either uppercase or lowercase. For
example:
COMMAND
can be entered as any of the following:
command Command COMMAND
It cannot, however, be entered as:
comm com_mand comamnd
italics In a syntax statement or an example, a word in
italics represents a parameter or argument that you
must replace with the actual value. In the following
example, you must replace filename with the name of
the file:
COMMAND filename
bold italics In a syntax statement, a word in bold italics
represents a parameter that you must replace with the
actual value. In the following example, you must
replace filename with the name of the file:
COMMAND(filename;)
punctuation In a syntax statement, punctuation characters (other
than brackets, braces, vertical bars, and ellipses)
must be entered exactly as shown. In the following
example, the parentheses and colon must be entered:
(filename):(filename)
underlining Within an example that contains interactive dialog,
user input and user responses to prompts are
indicated by underlining. In the following example,
yes is the user's response to the prompt:
Do you want to continue? >> yes
{ } In a syntax statement, braces enclose required
elements. When several elements are stacked within
braces, you must select one. In the following
example, you must select either ON or OFF:
{ON }
COMMAND {OFF}
Conventions (continued)
[ ] In a syntax statement, brackets enclose optional
elements. In the following example, OPTION can be
omitted:
COMMAND filename [OPTION]
When several elements are stacked within brackets,
you can select one or none of the elements. In the
following example, you can select OPTION or parameter
or neither. The elements cannot be repeated.
[OPTION ]
COMMAND filename [parameter]
[...] In a syntax statement, horizontal ellipses enclosed
in brackets indicate that you can repeatedly select
the element(s) that appear within the immediately
preceding pair of brackets or braces. In the example
below, you can select parameter zero or more times.
Each instance of parameter must be preceded by a
comma:
[,parameter][...]
In the example below, you only use the comma as a
delimiter if parameter is repeated; no comma is used
before the first occurrence of parameter:
[parameter][,...]
|...| In a syntax statement, horizontal ellipses enclosed
in vertical bars indicate that you can select more
than one element within the immediately preceding
pair of brackets or braces. However, each particular
element can only be selected once. In the following
example, you must select A, AB, BA, or B. The
elements cannot be repeated.
{A}
{B} |...|
... In an example, horizontal or vertical ellipses
indicate where portions of an example have been
omitted.
Å In a syntax statement, the space symbol Å shows a
required blank. In the following example, parameter
and parameter must be separated with a blank:
(parameter)Å(parameter)
The symbol indicates a key on the keyboard. For
example, RETURN represents the carriage return key or
Shift represents the shift key.
CTRLcharacter CTRLcharacter indicates a control character. For
example, CTRLY means that you press the control key
and the Y key simultaneously.
Conventions (continued)
base prefixes The prefixes %, #, and $ specify the numerical base
of the value that follows:
%num specifies an octal number.
#num specifies a decimal number.
$num specifies a hexadecimal number.
If no base is specified, decimal is assumed.
bits (bit:length) When a parameter contains more than one piece of data
within its bit field, the different data fields are
described in the format bits (bit:length), where bit
is the first bit in the field and length is the
number of consecutive bits in the field. For
example, bits (13:3) indicates bits 13, 14, and 15:
most significant least significant
|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|
| 0| | | | | | | | | | | | |13|14|15|
|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|
bits (0:1) bits (13:3)
MPE/iX 5.0 Documentation