Last change
on this file was
2759,
checked in by aslmd, 2 years ago
|
adding unmodified code from WRFV3.0.1.1, expurged from useless data +1M size
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2759] | 1 | /*$$$ SUBPROGRAM DOCUMENTATION BLOCK |
---|
| 2 | C . . . . |
---|
| 3 | C SUBPROGRAM: mova2i Moves a bit string from a char*1 to int |
---|
| 4 | C PRGMMR: Gilbert ORG: W/NP11 DATE: 02-08-15 |
---|
| 5 | C |
---|
| 6 | C ABSTRACT: This Function copies a bit string from a Character*1 variable |
---|
| 7 | C to an integer variable. It is intended to replace the Fortran Intrinsic |
---|
| 8 | C Function ICHAR, which only supports 0 <= ICHAR(a) <= 127 on the |
---|
| 9 | C IBM SP. If "a" is greater than 127 in the collating sequence, |
---|
| 10 | C ICHAR(a) does not return the expected bit value. |
---|
| 11 | C This function can be used for all values 0 <= ICHAR(a) <= 255. |
---|
| 12 | C |
---|
| 13 | C PROGRAM HISTORY LOG: |
---|
| 14 | C 98-12-15 Gilbert |
---|
| 15 | C |
---|
| 16 | C USAGE: I = mova2i(a) |
---|
| 17 | C |
---|
| 18 | C INPUT ARGUMENT : |
---|
| 19 | C |
---|
| 20 | C a - Character*1 variable that holds the bitstring to extract |
---|
| 21 | C |
---|
| 22 | C RETURN ARGUMENT : |
---|
| 23 | C |
---|
| 24 | C mova2i - Integer value of the bitstring in character a |
---|
| 25 | C |
---|
| 26 | C REMARKS: |
---|
| 27 | C |
---|
| 28 | C None |
---|
| 29 | C |
---|
| 30 | C ATTRIBUTES: |
---|
| 31 | C LANGUAGE: C |
---|
| 32 | C MACHINE: IBM SP |
---|
| 33 | |
---|
| 34 | C |
---|
| 35 | C$$$i*/ |
---|
| 36 | |
---|
| 37 | #include "proto.h" |
---|
| 38 | |
---|
| 39 | int MOVA2I(unsigned char *a) |
---|
| 40 | { |
---|
| 41 | return (int)(*a); |
---|
| 42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.