NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
pkc.f File Reference

Encode a character string within an integer array. More...

Go to the source code of this file.

Functions/Subroutines

subroutine pkc (CHR, NCHR, IBAY, IBIT)
 This subroutine encodes a character string within a specified number of bits of an integer array, starting at the bit immediately after a specified bit within the array. More...
 

Detailed Description

Encode a character string within an integer array.

Definition in file pkc.f.

Function/Subroutine Documentation

subroutine pkc ( character*(*)  CHR,
  NCHR,
dimension(*)  IBAY,
  IBIT 
)

This subroutine encodes a character string within a specified number of bits of an integer array, starting at the bit immediately after a specified bit within the array.

Author
J. Woollen
Date
1994-01-06
Parameters
[in]CHR- character*(*): String to be encoded
[in]NCHR- integer: Number of bytes of IBAY within which to encode CHR (i.e. the number of characters in CHR)
[out]IBAY- integer(*): Array containing encoded CHR
[in,out]IBIT- integer: Bit pointer within IBAY
  • On input, IBIT points to the bit within IBAY after which to begin encoding CHR.
  • On output, IBIT points to the last bit of IBAY which contains the encoded CHR.
Remarks
  • This subroutine is the logical inverse of subroutine upc().
  • On input, there is no requirement that IBIT must point to the first bit of a byte within IBAY. Correspondingly, on output there is no guarantee that the NCHR characters of CHR will be aligned on byte boundaries when encoded within IBAY.

Program history log:

  • 1994-01-06 J. Woollen – Original author
  • 1998-07-08 J. Woollen – Replaced call to Cray library routine ABORT with call to new internal routine bort()
  • 2003-11-04 J. Woollen – Modified to be endian-independent
  • 2003-11-04 J. Ator – Added documentation
  • 2003-11-04 S. Bender – Added remarks and routine interdependencies
  • 2003-11-04 D. Keyser – Unified/portable for WRF; added history documentation; outputs more complete diagnostic info when routine terminates abnormally; use bort2() instead of bort()
  • 2004-08-18 J. Ator – Modified to be compatible with writlc()

Definition at line 42 of file pkc.f.

References ipkm(), irev(), and iupm().

Referenced by cmsgini(), dxmini(), msgini(), msgwrt(), stndrd(), wrcmps(), wrdxtb(), writlc(), and wrtree().