HP 3000 Manuals

SPL to HP C/XL Migration Guide : COPYRIGHT NOTICE [ SPL to HP C/XL Migration Guide ] MPE/iX 5.0 Documentation


SPL to HP C/XL Migration Guide


SPL to HP C/XL Migration Guide Printed in U.S.A. 900 Series HP 3000 Computer Systems HP Part No. 30231-90001 Edition Second Edition Printed Oct 1989 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 for incidental or consequential damages in connection with the furnishing, performance, or use of this material. Hewlett-Packard assumes no responsibility for the use 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 Printing History The following table lists the various printings of this manual, together with the respective release date for each edition or update. The software code (Product VUF) printed alongside the release date indicates the version, update, and fix level of the software product at the time the manual edition or update was issued. Many software updates and fixes do not require changes to the manual. Therefore, do not expect a one-to-one correspondence between product updates and manual editions or updates. Edition Number Release Date Product VUF ---------------------------------------------------------------------------------------- First Edition February 1989 SPL 32100A.08.07 HP C/XL 31506A.00.02 Second Edition October 1989 SPL 32100A.08.09 HP C/XL 31506A.02.03 Additional Documentation The following publications provide information that can help you migrate SPL programs to HP C/XL. ------------------------------------------------------------------------------------------- | | | Number to Use to Manual Manual Title | | Order Manual Part Number | | | ------------------------------------------------------------------------------------------- | | | 30000-90024 30000-90024 Systems Programming Language Reference Manual | | | | 30000-90025 30000-90025 Systems Programming Language Textbook | | | ------------------------------------------------------------------------------------------- | | | 31506-60001 92434-90001 HP C Reference Manual | | | | 31506-60001 31506-90001 HP C/XL Reference Manual Supplement | | | | 31506-60001 30026-90001 HP C/XL Library Reference Manual | | | | 31506-60002 92434-90002 HP C Programmer's Guide | | | ------------------------------------------------------------------------------------------- | | | 30367-60003 30367-90007 Migration Process Guide | | | | 30367-60004 30367-90005 Introduction to MPE XL for MPE V Programmers | | | | 32650-60002 32650-90003 MPE XL Commands Reference Manual | | | | 32650-60013 32650-90028 MPE XL Intrinsics Reference Manual | | | | 32650-60030 32650-90014 Switch Programming User's Guide | | | | 31502-60006 31502-90002 HP Pascal Programmer's Guide | | | ------------------------------------------------------------------------------------------- Preface The SPL to HP C/XL Migration Guide describes how to convert SPL programs to HP C/XL. It is intended for experienced SPL programmers who are also acquainted with the C language. The guide is organized to parallel the Systems Programming Language Reference Manual. Chapter 2 of this guide corresponds to chapter 1 of the reference manual, and so forth. The topics are presented in the same order. Section Description Chapter 1 Provides a general overview of the migration process. Chapter 2 Highlights the differences between the SPL and HP C/XL source formats. Chapter 3 Describes the differences in data storage formats, constants, identifiers, arrays, and pointers. Chapter 4 Describes the differences in global declarations. Chapter 5 Describes conversions for SPL arithmetic and logical expressions, and assignment, MOVE, and SCAN statements. Chapter 6 Describes conversions for SPL program control statements. Chapter 7 Suggests some HP C/XL alternatives for SPL ASSEMBLE statements. Chapter 8 Describes the conversions required for SPL procedures, local declarations, and subroutines. Chapter 9 Discusses the conversion of SPL input/output intrinsics to HP C/XL standard functions that perform analogous operations. Chapter 10 Describes the differences between the SPL compiler commands and the HP C/XL compiler directives. Chapter 11 Discusses a method for converting SPL programs into HP C/XL. Appendix A Lists SPL procedures that are used as a first step toward converting to the HP C/XL macros and functions listed in Appendix B. Appendix B Lists HP C/XL functions that emulate special features of the SPL language. Conventions This section discusses the notation conventions followed in this manual. "Syntax" deals with the notation used in syntax diagrams. "General" discusses other aspects of textual notation and practices. Syntax Notation Description computer Letters, digits, and special characters displayed in "computer" type are required and should be entered exactly as shown. SPL permits keywords to be upper- or lowercase. HP C/XL differentiates uppercase from lowercase. In the following example, both the command and the trailing semicolon are required: EXIT ; italics Characters in "italics", typically words or compound words, denote elements that you must replace with appropriate values. In the following example, you must replace filename with the name of the file you want to close: CLOSE filename [ element ] Brackets enclose optional elements.+ When one or more elements are stacked inside brackets, you may select any one or none of the elements. For example: [A] [B] [C] You can select "A" or "B" or neither, and optionally add "C". When brackets are nested, parameters in inner brackets can be specified only if parameters in outer brackets are specified. For example: [X1 [, [X2] [, X3]]] can be entered as any of: blank X1 X1, X1,X2 X1,X2,X3 X1,,X3 { element } Braces enclose required elements. When one or more elements are stacked within braces, you must select one of those elements. For example: {A} {B} {C} You must select "A" or "B" or "C". Notation Description [...] A horizontal ellipsis enclosed in brackets indicates that the previous element, usually a selection enclosed in brackets or braces, may be repeated one or more times, separated, if necessary, by spaces. For example: [, itemname] [...] [,...] If the ellipsis is preceded by a punctuation mark, such as comma or semicolon, you must use that character to separate repetitions of the element. [item1] [item2] [,...] "[" "]" Where special characters that have syntactic meaning, such as the square brackets above, are required to be entered as text, they are shown in "computer" type, enclosed in "right-hand" quotation marks. The syntax: arrayname "[" subscript [,...] "]" represents the following examples: ABC[25,77] Aardvark [ noselength ] General Notation Description ...: Within examples, vertical and horizontal ellipses show where portions of the example have been omitted. bit n The bits in bytes, bit-fields, words, etc. are numbered from left to right from zero. In a 16-bit SPL "word", bit zero is the high-order left-hand bit and bit 15 is the low-order right-hand bit. In a 32-bit HP C/XL "word", bit zero is the high-order left-hand bit and bit 31 is the low-order right-hand bit.


MPE/iX 5.0 Documentation