Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
class(*), | intent(out) | :: | up | Unlimited polymorphic variable to be decoded. |
Decode an unlimited polymorphic scalar from base64.
subroutine b64_decode_up(code, up)
!---------------------------------------------------------------------------------------------------------------------------------
!< Decode an unlimited polymorphic scalar from base64.
!---------------------------------------------------------------------------------------------------------------------------------
character(*), intent(in) :: code !< Encoded scalar.
class(*), intent(out) :: up !< Unlimited polymorphic variable to be decoded.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
select type(up)
type is(real(R8P))
call b64_decode_R8(code=code,n=up)
type is(real(R4P))
call b64_decode_R4(code=code,n=up)
type is(integer(I8P))
call b64_decode_I8(code=code,n=up)
type is(integer(I4P))
call b64_decode_I4(code=code,n=up)
type is(integer(I2P))
call b64_decode_I2(code=code,n=up)
type is(integer(I1P))
call b64_decode_I1(code=code,n=up)
type is(character(*))
call b64_decode_string(code=code,s=up)
endselect
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine b64_decode_up