b64_decode_R8 Subroutine

private elemental subroutine b64_decode_R8(code, n)

Arguments

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

Calls

proc~~b64_decode_r8~4~~CallsGraph proc~b64_decode_r8~4 b64_decode_R8 proc~decode_bits~4 decode_bits proc~b64_decode_r8~4->proc~decode_bits~4

Called by

proc~~b64_decode_r8~4~~CalledByGraph proc~b64_decode_r8~4 b64_decode_R8 proc~b64_decode_up~4 b64_decode_up proc~b64_decode_up~4->proc~b64_decode_r8~4 interface~b64_decode~4 b64_decode interface~b64_decode~4->proc~b64_decode_r8~4

Contents

Source Code


Source Code

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

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