Decode a base64 code into an array numbers (R16P).
use befor64 use penf real(R16P) :: array_R16(1:2) call b64_decode(code='AAAAAABAXkCPwvUoXI8CQA==',n=array_R16) print "(L1)", str(n=array_R16)==str(n=[121._R16P,2.32_R16P])
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
real(kind=R16P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
pure subroutine b64_decode_R16_a(code, n)
!< Decode a base64 code into an array numbers (R16P).
!<
!<```fortran
!< use befor64
!< use penf
!< real(R16P) :: array_R16(1:2)
!< call b64_decode(code='AAAAAABAXkCPwvUoXI8CQA==',n=array_R16)
!< print "(L1)", str(n=array_R16)==str(n=[121._R16P,2.32_R16P])
!<```
!=> T <<<
character(*), intent(in) :: code !< Encoded array.
real(R16P), intent(out) :: n(1:) !< Array of numbers to be decoded.
integer(I1P), allocatable :: nI1P(:) !< One byte integer array containing n.
allocate(nI1P(1:size(n,dim=1)*BYR16P)) ; nI1P = 0_I1P
call decode_bits(code=code,bits=nI1P)
n = transfer(nI1P,n)
endsubroutine b64_decode_R16_a