900 Series HP 3000 Computer Systems DATA TYPES CONVERSION Programmer's Guide ABCDE HP Part No. 32650-90015 Printed in U.S.A.
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.
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.
iv
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.
It would be most useful to skim the entire manual once, then look up speci c 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 speci c topics.
Contents 1. Introduction How Do the Programmer and the Computer Communicate Data? . . . . . . . . . . . De ning Data Types . . . . . . . . . . . . Primitive Data Types . . . . . . . . . . . Intrinsic Data Types . . . . . . . . . . . Language Data Types . . . . . . . . . . . Formatting Data Types . . . . . . . . . . . Programming Environment . . . . . . . . Programming Languages . . . . . . . . . Converting Data Types . . . . . . . . . . . Using Di erent Types Together . . . . . .
HP COBOL II/XL . . . . . . . . . . . . HP FORTRAN 77/XL . . . . . . . . . . HP Pascal/XL . . . . . . . . . . . . . . 3. Converting Data Types Passing Data . . . . . . . . . Converting from Character: . . . To Other Character . . . . . . Between ASCII and EBCDIC Between Native Languages . Between Numeric Formats . . To Integer . . . . . . . . . . To Real . . . . . . . . . . . To Packed Decimal . . . . . . Converting from Integer . . . . . To Character . . . . . . . . To Other Integer . . . . . . . To Real .
Figures 2-1. 2-2. 2-3. 2-4. Bit Format: ASCII Character . . . . . . . Bit Format: EBCDIC Character . . . . . . Bit Format: 32-Bit Integer . . . . . . . . Bit Format: Single-Precision Real in IEEE Floating-Point Notation . . . . . . . . Bit Format: Double-Precision Real in IEEE Floating-Point Notation . . . . . . . . Bit Format: Single-Precision Real in HP3000 Floating-point Notation . . . . . . . . Bit Format: Double-Precision Real in HP3000 Floating-point Notation . . . . . . . . Bit Format: BCD Nibble .
1 Introduction This chapter gives you background on creating and receiving data in forms that your program and the operating system understand. It presents data types de ned by the designers of 900 Series HP 3000 Computer Systems, and the proper format for those types. How Do the Programmer and the Computer Communicate Data? The computer can receive information, manipulate it, and store it. It can access stored information, read it, and send it out.
Defining Data Types The designers of the computer de ne certain primitive system data types in order to receive input, store or manipulate data, and return information in a predictable way. How a process will use data input depends on the context. If a process requires a certain data type, it will attempt to interpret input as that type. For example, if you pass 32 binary bits to an intrinsic parameter that requires a le address, it may attempt to access the cell at that location in memory.
Language Data Types Some high-level programming languages running on MPE XL de ne their own data types based on the primitive types. The language compiler makes any necessary conversions between the primitive data types and the language-dependent data types. This conversion is transparent to the programmer. These types are described in the appropriate language manuals in the Language Manual Series. Languages may simply rename the primitive type, like the integer, a system type common to all languages.
Programming Languages Each environment supports its own high-level languages and compilers. Most are shown in Table 1-1. Table 1-1. Languages Supported on MPE XL Native Mode Compatibility Mode HP Business BASIC/XL HP Business BASIC/V HP C/XL HP COBOL II/XL COBOL II/V HP FORTRAN 66/V HP FORTRAN 77/XL HP FORTRAN 77/V HP Pascal/XL HP Pascal/V HP RPG/XL RPG/V SPL/V For language-speci c data types and formatting conventions, consult the appropriate language manual.
Converting Data Types You may want to change the form of information. Data output can be created by one MPE process that cannot be used in another without translation or conversion. Plan for conversion if you pass data to be used in the following situations: with data of another type between programming environments across programming languages Language commands, system intrinsics, and compiler library routines help you convert between types and formats.
You must plan for conversion if a program uses a subroutine written in a language with incompatible types. Some languages have commands that translate directly as data is read in and written out. You may need to write a routine to transform the data indirectly. Remember that all the data used in any MPE language is a primitive data type or is based on a primitive type.
2 Formatting Data Types This chapter helps you understand the data types supported on MPE XL. The rst part of the chapter de nes and describes the primitive data types recognized by MPE XL Native Mode systems and subsystems, including bit formats and alignments. The second part describes some formatting considerations in MPE XL supported programming languages and environments. Recognizing Primitive Data Types Data is an abstraction of information.
Character Character code formats are primitive data types. Characters are the letters, numbers, and symbols on your keyboard. The computer relates each alphanumeric character to an 8-bit (one byte) binary number, according to a correspondence code. Some of the characters are easily displayable, like +, ?, 8, and z; some are not, like a blank space or the carriage return.
Figure 2-1 shows the ASCII data type bit format. Figure 2-1. Bit Format: ASCII Character EBCDIC EBCDIC is another coding format widely used in the computer industry for character data. Like ASCII, it is based on the byte. EBCDIC is used in this guide as the name of a data type. EBCDIC data type corresponds to EBCDIC character code format for byte values in the range 0 to 255. Appendix A shows the ASCII and EBCDIC character code values, along with their decimal, octal, and hexadecimal equivalents.
Numeric MPE XL subsystems support three primitive data types for numbers: Integer. Real. Decimal. Integer An integer is any positive or negative whole number, including zero. Integers are useful for counting and for incrementing in loops. Signed integers are a useful form for exchanging numeric data between languages. MPE XL integers can be 8, 16, 32, or 64 bits long. They can be unsigned or signed (+ or 0). Signed integers are represented in twos complement form. Table 2-1.
Reading an Unsigned Integer: One method of reading an unsigned integer as a base-ten value is to consider the bits as columns whose values are powers of two. The rightmost (least signi cant) bit is the units column and has a weight of 20 , or 1. Going toward the left (the most signi cant bit), the columns have progressively greater weight: 20 , 21, 22, . . . 2n -1 .
In the example below, this method is used to interpret the signed binary integers 01010101 and 10101010, written in twos complement form, as decimal-based integers: (01010101)base 2 = the sum of: (10101010)base 2 = the sum of: (1 x 20 ) = 1 (0 x 20 ) = 0 (0 x 21 ) = 0 (1 x 21 ) = 2 (1 x 22 ) = 4 (0 x 22 ) = 0 (0 x 23 ) = 0 (1 x 23 ) = 8 (1 x 24 ) = 16 (0 x 24 ) = 0 (0 x 25 ) = 0 (1 x 25 ) = 32 (1 x 2 ) = 64 (0 x 2 ) = 0 (0 x 0(27 )) = 0 (1 x 0(27 )) = 0128
Figure 2-3 shows bit formats for the 32-bit integer type. Figure 2-3. Bit Format: 32-Bit Integer Real A real number is a value in the set of zero and the positive or negative rational numbers. Signed integers and fractions are included, although fractions may be approximated. Imaginary and complex numbers are not included in the set of real numbers, although high-level languages may have constructs for storing and working with them.
Note In this manual, assume all representations of oating-point real numbers use an integer base of 10 (decimal-based, or base-ten) unless otherwise indicated. Internally, the computer uses a base of two (is binary-based), and the conversion is approximate. You can represent real numbers four ways. You can choose either in IEEE or HP3000 format and use either single-precision or double-precision size. MPE XL recognizes two formats for storing oating-point real numbers: IEEE and HP3000.
Mantissas are represented in normalized form. That is, the leading one is stripped and binary point is not explicitly expressed. Each expressed mantissa, then, has an implied leading one and binary point. For example, a mantissa represented by 10101010101010101010101 is interpreted as the value 1.10101010101010101010101. The exponents of real numbers are biased. This means that both positive and negative true exponents are represented using only unsigned binary integers.
IEEE numbers in MPE oating-point notation contain three elds: Sign: The sign eld is bit (0:1), the rst bit of the rst word. A value of 0 indicates the number is positive, and a value of 1 indicates the number is negative. The sign bit is the only di erence between a real number value and its negative. Exponent: The single-precision exponent eld is bits (1:8) of the rst NM word, and is biased by 127. The double-precision exponent eld is bits (1:11) of the rst NM word, and is biased by 1023.
The (base-ten) oating-point number 100.00 (hexadecimal $42c80000) is represented as 0 10000101 10010000000000000000000. Using the formula, we obtain the correct result as follows: Table 2-3. Determining the Base-Ten Equivalent of an IEEE Real Number S(ign) E(xponent) M(antissa) = 0 10000101 10010000000000000000000 (01)S = = = = *2E-127 *(1.0+M+2023) * 2133-127 * 1.0+9/16 +2023 1 * 64 * 1.0 + 0.5625 + .00000011920929 64 * 1.
Figure 2-5 shows the IEEE real number double-precision bit format. Figure 2-5. Bit Format: Double-Precision Real in IEEE Floating-Point Notation Single-precision HP3000 real numbers are 32 bits (2 CM words), and double-precision are 64 bits (4 CM words). When stored in memory, HP3000 reals are aligned on CM word boundaries. HP3000 Real Number Format. Note In this manual, bit elds are described as (bit :length ), where bit is the rst bit in the eld and length is the number of consecutive bits in the eld.
Note In this manual, bit elds are described as (bit :length ), where bit is the rst bit in the eld and length is the number of consecutive bits in the eld. For example, \bits (11:3)" refers to bits 11, 12, and 13. Bit 0 is the most signi cant bit. Figure 2-6 shows the HP3000 real number single-precision bit format. Figure 2-6.
Figure 2-7 shows the HP3000 real number double-precision bit format. Figure 2-7. Bit Format: Double-Precision Real in HP3000 Floating-point Notation Decimals MPE V has system microcode instructions to handle packed decimals. For compatibility, MPE XL has compiler library procedures that run in NM and emulate the MPE V instruction set. In MPE XL, three languages use decimal types. COBOL and RPG use packed or unpacked decimals. BASIC has its own type, the oating-point decimal.
Figure 2-8 shows the bit format for each BCD nibble portion of a decimal. Figure 2-8. Bit Format: BCD Nibble Packed decimals represent numbers with BCD (Binary Coded Decimal) nibbles. In packed decimals, each decimal digit of the number is individually represented by a 4-bit BCD. Packed Decimal Format. Decimals are always an even number of nibbles long. Figure 2-8, above, shows the bit format for each BCD nibble portion of a decimal. The rightmost (least signi cant) nibble is for the sign.
In COBOL and RPG, using packed decimal will probably make your program more e cient than using unpacked. If you do use unpacked decimal, the compiler usually converts to packed for calculations. Figure 2-9 shows the bit format for the packed decimal. Figure 2-9. Bit Format: Packed Decimal COBOL and RPG represent numbers with packed and unpacked decimal types. For an unpacked decimal, each decimal digit is one byte long. Unpacked decimals are ASCII characters, interpreted by a correspondence code.
Table 2-4. Range and Precision for Floating-Point Decimals BASIC Decimal BASIC Short Decimal 12 digits 6 digits 09.99999999999E511 through 01.00000000000E0511 09.99999E63 through 01.000000E63 Precision: Range: 0 1.00000000000E0511 through 9.99999999999E511 0 1.00000E063 through 9.9999E63 The representation of the value zero is a special case. To represent the value zero, set all the bits to zero.
The sign eld of a 64-bit decimal is bits (60:4), which are the four least signi cant bits, or the least signi cant BCD nibble. The hexadecimal value C (1100) in the sign nibble indicates the number is positive, and D (1101) indicates the number is negative. The sign eld of a 32-bit short decimal is the seventh bit, bit (7:1). A value of 0 in the sign bit indicates the number is positive, and a value of 1 indicates the number is negative. Figure 2-10 shows the bit format for the oating-point decimal.
Formatting Data in Programs NM and CM Programming Environments The correct format for data in a program depends on the programming environment and the programming language. MPE XL has two programming environments: NM and CM. NM is based on a 32-bit word. CM emulates MPE V; both are based on a 16-bit word. In NM, data types are aligned on 32-bit boundaries, by default, to improve performance. Many structures that are aligned on 32-bit boundaries in MPE XL NM are aligned on 16-bit boundaries in MPE V/E.
Programming Languages Table 2-5, following, shows corresponding data types in the di erent NM languages: Table 2-5. Correspondence of Data Types Across Languages: Intrinsics, BASIC, and C Data Type Intrinsics HP Business HP C/XL BASIC/XL $ dimension as 1 character CHAR or UNSIGNED CHAR U16 N/A UNSIGNED SHORT INT U32 N/A UNSIGNED INT or UNSIGNED LONG INT U64 N/A N/A SHORTINT or subrange [032768..
Table 2-6. Correspondence of Data Types Across Languages: COBOL, FORTRAN, and Pascal Data Type HP Pascal/XL HP COBOL HP FORTRAN II/XL 77/XL Character DISPLAY or group item CHARACTER CHARACTER Integer: 16-bit unsigned PIC S9 to PIC S9(4) COMP LOGICAL OR LOGICAL*2 0..
Language Notes The following notes relate to the language-speci c information in the above table. For further information, consult the manual for the individual languages. Intrinsic parameters may require data of type address (@32 and @64). Address is a 32-bit or 64-bit integer that represents a location in memory. The system recognizes by the context of the command that it is to access or operate on the memory cell at that address. Intrinsics.
The C language has certain data conversion conventions for parameter passing. It requires that floats be converted to doubles, that chars be converted to ints, and that arrays of type T be converted to pointers to type T . Formal parameters are actually declared as the \converted" type. For example, if you declare a formal parameter as an array of type T , it is actually declared as a pointer to type T .
The COBOL number line for usage display unpacked signed decimal digits looks like this, then: R Q P O N M L K J } { A B C D E F G H I -+--+--+--+--+--+--+--+--+--|--+--+--+--+--+--+--+--+--+-9 -8 -7 -6 -5 -4 -3 -2 -1 0 +1 +2 +3 +4 +5 +6 +7 +8 +9 For further information, refer to HP COBOL II/XL Programmer's Guide (31500-90002) or COBOL II Reference Manual (31500-90001) and COBOL II/XL Reference Manual Supplement (31500-90005). In HP FORTRAN 77/XL, LOGICAL and INTEGER default to 32 bits.
3 Converting Data Types This chapter discusses converting each of the system data types described in Chapter 2 to each of the others. Data is information structured in forms that the computer is designed to process. Data conversion is translating that information into another acceptable structure without losing meaning. If you pass data between routines that do not use the same types or formats, you lose meaning and integrity. The receiving routine may not be able to read the data at all.
to manipulate decimals. Because the sizes of the operands are passed as parameters, these routines are useful in applications where the eld sizes are not known at compile-time, such as general-purpose database applications and report writers. Packed-decimal procedures must be declared as intrinsics to be called from within high-level NM languages. If speed is a primary concern, consider doing packed-decimal operations within HP COBOL II/XL or HP RPG/XL.
French German Italian Norwegian Portuguese Spanish Swedish Icelandic KANA8 supports: NATIVE-3000 KATAKANA ARABIC8 supports: Arabic Western Arabic Greek8 supports Greek Turkish8 supports Turkish Use the intrinsic NLINFO or generate a report from the NLUTIL utility to review information about a character's native language format. For more information, refer to MPE XL Intrinsics Reference Manual (32650-90028). Use the intrinsic CTRANSLATE to translate between EBCDIK and JIS(KANA8).
returns a string with the same number, but formatted with the decimal separator, thousands separator, and currency symbol or name of the native language you specify. NLNUMSPEC accepts a string as a logical byte array (minimum 60 bytes) and a language identi cation number. It returns the string encoded with information (number speci cations) about the characteristics of the language, such as Direction (left-to-right or right-to-left), Digit range.
bits. The result parameter is a 32-bit pointer to the rst word of result storage, according to the type speci ed. Other parameters let you specify eld width, decimal places, exponents, and fractions. To Packed Decimal In MPE V, system instructions use packed decimals; for compatibility, MPE XL has compiler library procedures that run in NM and emulate the MPE V instruction set. In MPE XL, the packed decimal type is used only in COBOL or RPG, however.
The compiler utility procedures INEXT' and HPINEXT also accept an integer and return a character string of ASCII digits. To Other Integer To Real All languages supported on 900 Series HP 3000 Computer Systems with the MPE XL operating system have a way, within the language, to assign value from one integer type to the other integer types. Most high-level languages have assignments to convert integers to reals within the language.
a least signi cant bit of zero; in other words, the even integer. For example, 01.5 rounds to 02, and 2.5 rounds to 2. HP3000 rounds to the integer of greatest magnitude. For example, 01.5 rounds to 02 and 2.5 rounds to 3. Rounding directives within a language behave in language-speci c ways; consult the language manual, or test a mid-point number if you are doubtful. To Other Real As discussed in Chapter 2, there are two formats for real oating-point numbers in MPE XL: IEEE and HP3000.
You may encounter two types of errors: Under ow or Over ow Inexact Overflow and Underflow Conversion between formats can present a range problem, when the target range is smaller. Thus, over ow and under ow can occur in performing either of the following conversions: From a HP3000 single-precision real number to an IEEE single-precision number. From an IEEE double-precision real number to an HP3000 double-precision. You may have to develop new error handling code to prevent this.
If your conversion is taking place within COBOL or RPG, you cannot operate on a real number, as required in step 1 above. Instead, follow these steps: 1. Convert the real number into a character. 2. Convert the resulting character to a decimal. (See the previous sections about making these conversions.) Converting from Packed Decimal This section o ers some suggestions converting packed decimal data types to character, integer, and real data types.
To Other Decimals The MOVE command is used to change one decimal to another within COBOL or RPG. Outside of COBOL or RPG, use the compiler library functions HPPACSRD and HPPACSLD to perform right and left shifts on packed decimals. You specify the amount of o set (the number of digits to be shifted). To convert a packed decimal to a BASIC decimal, you should convert rst to a twos complement integer or type ASCII, and then convert to decimal within BASIC with an assignment.
A ASCII and EBCDIC Code Values The following table shows ASCII and EBCDIC character code values along with their decimal, octal, and hexadecimal equivalents. Control/graphic abbreviations, like NUL and SOH, are spelled out at the end of the table.
Table A-1. ASCII/EBCDIC Character Sets A-2 ASCII EDCDIC Control/ Control/ Graphic Graphic Decimal Octal Hexadecimal CAN EM SUB ESC FS GS RS US SP ! " # $ % & ' ( ) * + , .
ASCII/EBCDIC Character Sets ASCII EDCDIC Control/ Control/ Graphic Graphic 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W CU3 DC4 NAK SUB SP .
ASCII/EBCDIC Character Sets ASCII EDCDIC Control/ Control/ Graphic Graphic X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w A-4 ASCII and EBCDIC Code Values ! $ * ) ; / , % _ > ? Character Code Values Decimal Octal Hexadecimal 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 130 131 132 133 134 135 136 137 140 141 142 143 144 145 146 147 150 151 152 153 154 155 156 157 160 161 162 163 164 165 166 167 58 59 5A
ASCII/EBCDIC Character Sets, continued ASCII EDCDIC Character Code Values Character Code Values ASCII EBCDIC Control/ Control/ Graphic Graphic x y z { | } ~ DEL : # @ ' = " a b c d e f g h i j k l m n o p Decimal Octal Hexadecimal 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 170 171 172 173 174 175 176 177 200 201 202 203 204 205 206 207 210 211 212 213 214 215 216 217 220 221 222 223 224 225 226 227 78 79 7
ASCII/EBCDIC Character Sets ASCII EDCDIC Control/ Control/ Graphic Graphic Decimal Octal Hexadecimal q r 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 230 231 232 233 234 235 236 237 240 241 242 243 244 245 246 247 250 251 252 253 254 255 256 257 260 261 262 263 264 265 266 267 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 ~ s t u v w x y z A-6 ASCII and EBCDIC
ASCII/EBCDIC Character Sets ASCII EBCDIC Control/ Control/ Graphic Graphic A B C D E F G H I J K L M N O P Character Code Values Decimal Octal Hexadecimal 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 270 271 272 273 274 275 276 277 300 301 302 303 304 305 306 307 310 311 312 313 314 315 316 317 320 321 322 323 324 325 326 327 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4
ASCII/EBCDIC Character Sets ASCII EBCDIC Control/ Control/ Graphic Graphic Decimal Octal Hexadecimal Q R 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 330 331 332 333 334 335 336 337 340 341 342 343 344 345 346 347 350 351 352 353 354 355 356 357 360 361 362 363 364 365 366 367 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 \ S T U V W X Y Z 0 1 2 3 4 5 6 7 A-8
ASCII/EBCDIC Character Sets NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US SP DEL ASCII EBCDIC Character Code Values Control/ Control/ Graphic Graphic Decimal Octal Hexadecimal 8 9 248 249 250 251 252 253 254 255 370 371 372 373 374 375 376 377 F8 F9 FA FB FC FD FE FF Null Start of Heading Start of Text End of Text End of Transmission Enquiry acknowledge Bell Backspace Horizontal Tabulation Line Feed Vertical Tabulation Form
Index A accuracy and range for BASIC decimals, 2-16 accuracy and range for real formats, 2-8 accuracy errors converting reals, 3-8 address type in intrinsic parameters, 2-22 AINT and AINT' compiler functions, 3-8 $alignment$ alignment option, 2-19 alignment and size of data speci ed, 1-3 alignment control with commands and compiler options, 2-19 alphanumeric characters, 2-2 American English native language characters, 3-2 American National Standards Institute format, 2-9 American Standard Code for Informat
IEEE real, 2-11 integer, 2-7 packed decimal, 2-16 bit format notation, 2-1 bit sequences, 1-1 Booleans in C, 2-22 Boolean type in intrinsic parameters, 2-22 boundaries speci ed in format, 1-3, 2-19 C Index-2 CALLALIGNED option, 2-19 Canadian French native language characters, 3-2 character, converting from, 3-2 character string, octal, decimal, hexadecimal, 3-4 character type data, 2-2 C language data types compared to primitive types, 2-20 language notes, 2-22 parameter type requirements, 2-22 C languag
converting from packed decimal to character, 3-9 to integer, 3-9 to other decimals, 3-10 to real, 3-9 converting from packed decimal types, 3-9 converting from real to character types, 3-6 to integer types, 3-6 to packed decimal types, 3-8 to real types, 3-7 converting from real types, 3-6 converting to twos complement, 2-6 correspondence between language data types, 2-20 CTRANSLATE intrinsic, 3-2, 3-3 D Danish native language characters, 3-2 DASCII intrinsic, 3-5 data type real, 2-7 data types numeric, 2
Index-4 E EBCDIC, 2-2, 2-3 EBCDIC bit format, 2-3 EBCDIK and JIS(KANA8) translation, 3-3 emulating MPE V decimal operations, 3-1 English native language characters, 3-2 environments a factor in formatting, 1-3, 2-19 errors in converting reals, 3-7 exponent eld of reals, 2-9 exponent elds, special, 2-9 exponent represented in biased form, 2-9 Extended Binary Coded Decimal Interchange Code, 2-2, 2-3 EXTIN' compiler utility procedure, 3-4 F elds BASIC oating-point decimal, 2-17 HP3000 real numbers, 2-12 IE
I Icelandic native language characters, 3-2 IEEE and HP3000 reals, rounding di erences, 3-6 IEEE bit formats, 2-11 IEEE conversion formula, 2-10 IEEE or HP3000 format for real numbers, 2-8 IEEE real number elds, 2-10 IEEE real numbers, 2-9 IFIX compiler function, 3-6 inexact errors converting reals, 3-8 INEXT' compiler utility procedure, 3-5, 3-6 in nity and NaN traps, 2-9 in nity in real data type, 2-9 Institute of Electrical and Electronics Engineers format, 2-9 INT, and INT' compiler functions, 3-6 inte
Index-6 L language data types, 1-3 language data types correspondence, 2-20 languages in NM and CM environments, 1-4, 2-19 language-speci c notes on data correspondences, 2-22 LINKALLIGNED option, 2-19 M mantissa eld of reals, 2-8 mantissa represented in normalized form, 2-8 N Nan and in nity traps, 2-9 NaN in real data type, 2-9 NATIVE-3000, 3-2 NATIVE-3000 language characters, 3-3 native language character sets, 3-2 native language numeric character formats, 3-3 Native Mode programming environment,
Q quiet Nan, 2-9 R range and accuracy for BASIC decimals, 2-16 range and accuracy for real formats, 2-8 range and size of integers, 2-4 reading an IEEE real, 2-10 reading an unsigned integer, 2-5 reading a signed integer, 2-5, 2-6 reading a twos complement integer, 2-5 real format elds, 2-8 HP3000 or IEEE, 2-8 range and accuracies, 2-8 single-precision or double-precision, 2-8 real number bit formats HP3000, 2-13 IEEE, 2-11 real number data type, 2-7 real number format HP3000, 2-12 real number format con
speci ed alignment and size in format, 1-3 SPL decimals and compiler routines to emulate, 3-1 Swedish native language characters, 3-2 sync16 or sync32 alignment option, 2-19 Index-8 T translating real to decimal-base, 2-10 traps in converting reals, 3-7 truncating real numbers, 3-8 Turkish8 language support, 3-3 Turkish8 native language characters, 3-3 twos complement form, 2-5 twos complement integer converted from decimal, 2-6 converted to decimal, 2-5 U unde ned numbers in real data type, 2-9 under