b64_decode_I2 Subroutine

private elemental subroutine b64_decode_I2(code, n)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: code
integer(kind=I2P), intent(out) :: n

Calls

proc~~b64_decode_i2~2~~CallsGraph proc~b64_decode_i2~2 b64_decode_I2 proc~decode_bits~2 decode_bits proc~b64_decode_i2~2->proc~decode_bits~2

Called by

proc~~b64_decode_i2~2~~CalledByGraph proc~b64_decode_i2~2 b64_decode_I2 proc~b64_decode_up~2 b64_decode_up proc~b64_decode_up~2->proc~b64_decode_i2~2 interface~b64_decode~2 b64_decode interface~b64_decode~2->proc~b64_decode_i2~2

Contents

Source Code


Source Code

   elemental subroutine b64_decode_I2(code, n)
   !< Decode a base64 code into a scalar number (I2P).
   !<
   !<```fortran
   !< use befor64
   !< use penf
   !< integer(I2P) :: scalar_I2
   !< call b64_decode(code='Nf8=',n=scalar_I2)
   !< print "(L1)", scalar_I2==-203_I2P
   !<```
   !=> T <<<
   character(*), intent(in)  :: code    !< Encoded scalar.
   integer(I2P), intent(out) :: n       !< Number to be decoded.
   integer(I1P), allocatable :: nI1P(:) !< One byte integer array containing n.

   allocate(nI1P(1:BYI2P)) ; nI1P = 0_I1P
   call decode_bits(code=code,bits=nI1P)
   n = transfer(nI1P,n)
   endsubroutine b64_decode_I2