home *** CD-ROM | disk | FTP | other *** search
- INTRO_CONVERSION(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- IINNTTRROO__CCOONNVVEERRSSIIOONN - Introduction to conversion routines
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- See individual man pages for implementation details.
-
- DDEESSCCRRIIPPTTIIOONN
- These Fortran-callable subroutines perform conversion of data residing
- in Cray Research systems memory. Conversion subprograms are listed
- under the following types of routines:
-
- * Foreign data conversion
-
- * Numeric conversion
-
- * ASCII conversion
-
- * IEEE conversion
-
- * Other conversion
-
- For more information regarding foreign data conversion, see the
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _I/_O _G_u_i_d_e.
-
- The UUSSCCCCTTCC and UUSSCCCCTTII routines are available on IRIX systems. Both
- routines are documented on the UUSSCCCCTTCC man page. In addition, the
- CCRRYY22MMIIPPSS and MMIIPPSS22CCRRYY routines are available on IRIX systems. Both
- routines are documented on the CCRRYY22MMIIPPSS man page.
-
- FFOORREEIIGGNN DDAATTAA CCOONNVVEERRSSIIOONN RROOUUTTIINNEESS
- The foreign data conversion routines translate data in both directions
- between Cray Research internal representations and that of other
- vendors, including IBM, CDC, ETA, IEEE, and DEC (VAX systems). The
- following tables list these conversion routines by the data type on
- which they operate. Cray Research recommends the newer routines:
- IIBBMM22CCRRAAYY, CCDDCC22CCRRAAYY, VVAAXX22CCRRAAYY, NNVVEE22CCRRAAYY, IIEEGG22CCRRAAYY, EETTAA22CCRRAAYY, CCRRAAYY22IIBBMM,
- CCRRAAYY22CCDDCC, CCRRAAYY22VVAAXX, CCRRAAYY22NNVVEE, CCRRAAYY22IIEEGG, and CCRRAAYY22EETTAA. Generally,
- routines that are inverses of each other (that is, converted from Cray
- Research data types to IBM and IBM to Cray Research) are listed under
- a single entry. Routine descriptions follow later in this section,
- listed alphabetically by entry name.
-
- These routines are used for data conversion:
-
- CCoonnvveerrssiioonn rroouuttiinneess oonn CCrraayy PPVVPP ssyysstteemmss
- --------------------------------------------------------------------
- Name Foreign->Native Native->Foreign
- --------------------------------------------------------------------
- IBM IIBBMM22CCRRAAYY CCRRAAYY22IIBBMM
- VAX/VMS VVAAXX22CCRRAAYY CCRRAAYY22VVAAXX
- CDC (NOS) CCDDCC22CCRRAAYY CCRRAAYY22CCDDCC
- CDC (NOS/VE) NNVVEE22CCRRAAYY CCRRAAYY22NNVVEE
- CDC CYBER 205 EETTAA22CCRRAAYY CCRRAAYY22EETTAA
- Generic IEEE (32-bit) IIEEGG22CCRRAAYY CCRRAAYY22IIEEGG
- IEEE little-endian IIEEUU22CCRRAAYY CCRRAAYY22IIEEUU
- Cray IEEE (64-bit) CCRRII22CCRRAAYY CCRRAAYY22CCRRII
- SGI MIPS MMIIPPSS22CCRRYY CCRRYY22MMIIPPSS
- User conversion UUSSRR22CCRRAAYY CCRRAAYY22UUSSRR
- Site conversion SSTTEE22CCRRAAYY CCRRAAYY22SSTTEE
- --------------------------------------------------------------------
-
- CCoonnvveerrssiioonn rroouuttiinneess ffoorr CCrraayy MMPPPP ssyysstteemmss::
- --------------------------------------------------------------------
- Name Foreign->Native Native->Foreign
- --------------------------------------------------------------------
- Cray PVP systems (non- CCRRAAYY22CCRRII and CCRRYY22CCRRII CCRRII22CCRRAAYY and CCRRII22CCRRYY
- IEEE)
- IBM IIBBMM22CCRRII CCRRII22IIBBMM
- Generic IEEE (32-bit) IIEEGG22CCRRII CCRRII22IIEEGG
- User conversion UUSSRR22CCRRAAYY CCRRAAYY22UUSSRR
- Site conversion SSTTEE22CCRRAAYY CCRRAAYY22SSTTEE
- --------------------------------------------------------------------
-
- CCoonnvveerrssiioonn rroouuttiinneess oonn CCRRAAYY TT9900 ((nnoonn--IIEEEEEE))
- --------------------------------------------------------------------
- Name Foreign->Native Native->Foreign
- --------------------------------------------------------------------
- Cray PVP systems (non- CCRRYY22CCRRII CCRRII22CCRRYY
- IEEE)
- IBM IIBBMM22CCRRII CCRRII22IIBBMM
- Generic IEEE (32-bit) IIEEGG22CCRRII CCRRII22IIEEGG
- User conversion UUSSRR22CCRRAAYY CCRRAAYY22UUSSRR
- Site conversion SSTTEE22CCRRAAYY CCRRAAYY22SSTTEE
- --------------------------------------------------------------------
-
- CCoonnvveerrssiioonn rroouuttiinneess oonn IIRRIIXX ssyysstteemmss ((MMIIPPSS))
- --------------------------------------------------------------------
- Name Foreign->Native Native->Foreign
- --------------------------------------------------------------------
- Cray PVP systems (non- CCRRYY22MMIIPPSS MMIIPPSS22CCRRYY
- IEEE)
- User conversion UUSSRR22CCRRAAYY CCRRAAYY22UUSSRR
- Site conversion SSTTEE22CCRRAAYY CCRRAAYY22SSTTEE
- --------------------------------------------------------------------
-
- SSuuppeerrsseeddeedd rroouuttiinneess:: FFoorreeiiggnn ttoo CCrraayy RReesseeaarrcchh
- The following table lists superseded, older routines that are
- supported to maintain continuity. Cray Research recommends using the
- newer routines named in the preceding list.
-
- --------------------------------------------------------------
- Conversion IBM CDC VAX/VMS
- --------------------------------------------------------------
- Foreign single precision to Cray UUSSSSCCTTCC FFPP66006644 VVXXSSCCTTCC
- single precision
- Foreign double precision to Cray UUSSDDCCTTCC ------ VVXXDDCCTTCC
- single precision
- VVXXGGCCTTCC
- Foreign double precision to Cray ------ ------ VVXXBBCCTTCC
- double precision
- Foreign integer to Cray integer UUSSIICCTTCC IINNTT66006644 VVXXIICCTTCC
- Foreign logical to Cray logical UUSSLLCCTTCC ------ VVXXLLCCTTCC
- Foreign character to ASCII UUSSCCCCTTCC DDSSAASSCC ------
- VAX 64-bit complex to Cray single ------ ------ VVXXZZCCTTCC
- precision
- IBM packed-decimal field to Cray UUSSPPCCTTCC ------ ------
- integer
- --------------------------------------------------------------
-
- SSuuppeerrsseeddeedd rroouuttiinneess:: CCrraayy RReesseeaarrcchh ttoo FFoorreeiiggnn
- The following routines convert Cray Research types to foreign types.
- The man pages for these routines appear under the name of the inverse
- of each routine (for example, CCRRAAYY22IIBBMM is described under entry
- IIBBMM22CCRRAAYY).
-
- RRoouuttiinnee TTyyppee
- CCRRAAYY22IIBBMM IBM
- CCRRAAYY22CCDDCC CDC
- CCRRAAYY22VVAAXX VAX/VMS
- CCRRAAYY22NNVVEE NOS/VE
- CCRRAAYY22EETTAA ETA/CYBER 205
- CCRRAAYY22IIEEGG IEEE (32-bit)
- CCRRAAYY22IIEEUU DEC
- CCRRAAYY22CCRRII IEEE (UNICOS/mk)
-
- The following table lists older routines that convert Cray Research
- types to foreign types. These routines are supported to maintain
- continuity. Cray Research recommends using the newer routines named
- in the preceding list rather than these routines.
-
- --------------------------------------------------------------
- Conversion IBM CDC VAX/VMS
- --------------------------------------------------------------
- Cray single precision to foreign UUSSSSCCTTII FFPP66446600 VVXXSSCCTTII
- single precision
- Cray single precision to foreign UUSSDDCCTTII ------ VVXXDDCCTTII,
- double precision VVXXGGCCTTII
- Cray double precision to foreign ------ ------ VVXXBBCCTTII
- double precision
- Cray integer to foreign integer UUSSIICCTTII IINNTT66446600 VVXXIICCTTII
- Cray logical to foreign logical UUSSLLCCTTII ------ VVXXLLCCTTII
- ASCII character to foreign UUSSCCCCTTII AASSCCDDCC ------
- character
- Cray complex to foreign complex ------ ------ VVXXZZCCTTII
- Cray integer to foreign packed- UUSSIICCTTPP ------ ------
- decimal field
- --------------------------------------------------------------
-
- NNUUMMEERRIICC CCOONNVVEERRSSIIOONN RROOUUTTIINNEE
- CCHHCCOONNVV converts decimal ASCII numerals to an integer format. It is an
- internal library routine.
-
- AASSCCIIII CCOONNVVEERRSSIIOONN FFUUNNCCTTIIOONNSS
- The ASCII conversion functions convert binary integers to or from
- 1-word ASCII strings (not Fortran character variables).
-
- Note: The ASCII conversion functions are not intrinsic to Fortran.
- Their default type is real, even though their results are generally
- used as integers.
-
- The ASCII conversion routines use one type integer argument. The DDTTBB
- and OOTTBB routines can also use a second optional argument as an error
- code. The resulting error codes (0 if no error; -1 if there are
- errors) are returned in the second argument for Fortran calls. If no
- error code argument is included in Fortran calls, the routine aborts
- if an error is encountered.
-
- The following calls show how the ASCII conversion routines are used.
- These Fortran calls convert a binary number to decimal ASCII, then
- convert back from ASCII to binary. They use internal I/O routines.
-
- _r_e_s_u_l_t=BBTTDD((_i_n_t_e_g_e_r))
-
- _r_e_s_u_l_t Decimal ASCII result (right-justified, blank-filled)
-
- _i_n_t_e_g_e_r Integer argument
-
- _r_e_s_u_l_t=DDTTBB((_a_r_g,_e_r_r_c_o_d_e))
-
- _r_e_s_u_l_t Integer value
-
- _a_r_g Decimal ASCII (left-justified, zero-filled)
-
- _e_r_r_c_o_d_e 0 if conversion successful; -1 if error
-
- The following table lists the ASCII conversion functions.
-
- -------------------------------------------------------------
- Purpose Name Argument range Result
- -------------------------------------------------------------
- Binary to decimal BBTTDD 0 <= x <= One-word ASCII
- ASCII (right- 99999999 string (right-
- justified, blank- justified,
- filled) blank-filled)
- Binary to decimal BBTTDDLL 0 <= x <= One-word ASCII
- ASCII (left- 99999999 string (left-
- justified, zero- justified,
- filled) zero-filled)
- Binary to decimal BBTTDDRR 0 <= x <= One-word ASCII
- ASCII (right- 99999999 string (right-
- justified, zero- justified,
- filled) zero-filled)
- Binary to octal BBTTOO 0 <= x <=
- ASCII (right- 77777777 One-word ASCII
- justified, blank- 8 string (right-
- filled) justified,
- blank-filled)
- Binary to octal BBTTOOLL 0 <= x <=
- ASCII (left- 77777777 One-word ASCII
- justified, zero- 8 string (left-
- filled) justified,
- zero-filled)
- Binary to octal BBTTOORR 0 <= x <=
- ASCII (right- 77777777 One-word ASCII
- justified, zero- 8 string (right-
- filled) justified,
- zero-filled)
- Decimal ASCII to DDTTBB Decimal ASCII One word
- binary (left- containing
- justified, decimal
- zero-filled) equivalent of
- ASCII string
- Octal ASCII to OOTTBB Octal ASCII One word
- binary (left- containing octal
- justified, equivalent of
- zero-filled) ASCII string
- -------------------------------------------------------------
-
- The Cray Assembly Language (CAL) entry points are the same as the
- Fortran entry points for the preceding routines with the percent sign
- (%) appended. For example, BBTTDDLL is called as BBTTDDLL%% from CAL.
-
- IIEEEEEE CCOONNVVEERRSSIIOONN RROOUUTTIINNEESS
- The IEEE conversion routines convert Cray single-precision real
- numbers to or from IEEE single- or double-precision real numbers.
-
- The following list contains the purpose and name of the IEEE
- conversion routines. See the individual man pages for implementation
- details.
-
- * IIEEGG22CCRRAAYY: Converts IEEE/Generic 32-bit data to Cray data
-
- * CCRRAAYY22IIEEGG: Converts Cray data to IEEE/Generic 32-bit data
-
- * IIEEUU22CCRRAAYY: Converts DEC ULTRIX/Generic Little Endian 32-bit data to
- Cray data
-
- * CCRRAAYY22IIEEUU: Converts Cray data to DEC ULTRIX Generic Little Endian
- 32-bit data
-
- * CCRRII22CCRRYY: Converts Fortran data from UNICOS/mk to UNICOS type
-
- * CCRRYY22CCRRII: Converts Fortran data from UNICOS to UNICOS/mk type
-
- * CCRRII22CCRRAAYY: Converts IEEE/MPP 32-bit data to Cray Research PVP 64-bit
- data
-
- * CCRRAAYY22CCRRII: Converts Cray Research PVP 64-bit data to IEEE/MPP 32-bit
- data
-
- OOTTHHEERR CCOONNVVEERRSSIIOONN RROOUUTTIINNEESS
- These routines place the octal ASCII representation of a Cray word
- into a character area, convert trailing blanks to nulls or trailing
- nulls to blanks, and translate a string from one code to another,
- using a translation table.
-
- The following list contains the purpose and name of these conversion
- routines.
-
- * BB22OOCCTT: Places an octal ASCII representation of a Cray word into a
- character area
-
- * CCHHCCOONNVV: Converts decimal ASCII to integers
-
- * RRBBNN: Converts trailing blanks to nulls
-
- * RRNNBB: Converts trailing nulls to blanks
-
- SSEEEE AALLSSOO
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-