NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3ai15.f File Reference

Converts a set of binary numbers to an equivalent set of ascii number fields in core. More...

Go to the source code of this file.

Functions/Subroutines

subroutine w3ai15 (nbufa, nbufb, n1, n2, minus)
 Converts a set of binary numbers to an equivalent set of ascii number fields in core.
 

Detailed Description

Converts a set of binary numbers to an equivalent set of ascii number fields in core.

Author
R. Allard
Date
1974-01

Definition in file w3ai15.f.

Function/Subroutine Documentation

◆ w3ai15()

subroutine w3ai15 ( integer, dimension(*)  nbufa,
integer, dimension(*)  nbufb,
  n1,
  n2,
character*1  minus 
)

Converts a set of binary numbers to an equivalent set of ascii number fields in core.

This is an alternate procedure to the use of the 360/195 version of encode.

Program history log:

  • R. Allard 1974-01-15
  • Ralph Jones 1989-02-06 Change from assembler to fortran this subroutine should be rewritten in intel 8088 assembly language.
  • Ralph Jones 1990-08-13 Change to cray cft77 fortran.
  • Boi Vuong 2012-11-05 Change variable zero fill for little-endian.
Parameters
[in]NBUFAInput array (integer*4).
[in]N1Number of integers in nbufa to be converted.
[in]N2Desired character width of ascii number field.
[in]MINUSCharacter to be inserted in the high order position of a negative number field.
[out]NBUFBOutput array (integer*4).
Note
If n2 is greater than 4, allow two words (eight characters) in the nbufb array for each ascii number field. A number field is left adjusted with blank fill to the right if needed. Likewise, if n2 is less than 4, the result is left adjusted with blank fill to the right.
N2 can be specified in the range 1-8. An eight digit positive integer can be converted or a seven digit negative integer and a sign. Zero fill is used for high order positions in a number field. The user should be aware that w3ai15 does not verify that the value of n2 is in the correct range.
The minus sign can be inserted as a literal in the call sequence or defined in a data statement. 1h- and 1h+ are the two most likely negative signs. Unfortunately the ascii plus character is the negative sign required in most transmissions. The minus sign will always be in the high order position of a negative number field.
If a number contains more digits than the n2 specification allows, the excess high order digits are lost.
Author
R. Allard
Date
1974-01

Definition at line 47 of file w3ai15.f.