b64_decode_R4 Subroutine

private elemental subroutine b64_decode_R4(code, n)

Arguments

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

Calls

proc~~b64_decode_r4~2~~CallsGraph proc~b64_decode_r4~2 b64_decode_R4 proc~decode_bits~2 decode_bits proc~b64_decode_r4~2->proc~decode_bits~2

Called by

proc~~b64_decode_r4~2~~CalledByGraph proc~b64_decode_r4~2 b64_decode_R4 proc~b64_decode_up~2 b64_decode_up proc~b64_decode_up~2->proc~b64_decode_r4~2 interface~b64_decode~2 b64_decode interface~b64_decode~2->proc~b64_decode_r4~2

Contents

Source Code


Source Code

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

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