b64_decode_R16 Subroutine

private elemental subroutine b64_decode_R16(code, n)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: code
real(kind=R16P), intent(out) :: n

Calls

proc~~b64_decode_r16~3~~CallsGraph proc~b64_decode_r16~3 b64_decode_R16 proc~decode_bits~3 decode_bits proc~b64_decode_r16~3->proc~decode_bits~3

Contents

Source Code


Source Code

   elemental subroutine b64_decode_R16(code, n)
   !< Decode a base64 code into a scalar number (R16P).
   !<
   !<```fortran
   !< use befor64
   !< use penf
   !< real(R16P) :: scalar_R16
   !< call b64_decode(code='CKwcWmTHYEA=',n=scalar_R16)
   !< print "(L1)", scalar_R16==134.231_R16P
   !<```
   !=> T <<<
   character(*), intent(in)  :: code    !< Encoded scalar.
   real(R16P),   intent(out) :: n       !< Number to be decoded.
   integer(I1P), allocatable :: nI1P(:) !< One byte integer array containing n.

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