b64_encode_up Subroutine

public subroutine b64_encode_up(up, code)

Arguments

TypeIntentOptionalAttributesName
class(*), intent(in) :: up
character(len=:), intent(out), allocatable:: code

Calls

proc~~b64_encode_up~4~~CallsGraph proc~b64_encode_up~4 b64_encode_up proc~b64_encode_i4~4 b64_encode_I4 proc~b64_encode_up~4->proc~b64_encode_i4~4 proc~b64_encode_i1~4 b64_encode_I1 proc~b64_encode_up~4->proc~b64_encode_i1~4 proc~b64_encode_r4~4 b64_encode_R4 proc~b64_encode_up~4->proc~b64_encode_r4~4 proc~b64_encode_i2~4 b64_encode_I2 proc~b64_encode_up~4->proc~b64_encode_i2~4 proc~b64_encode_r8~4 b64_encode_R8 proc~b64_encode_up~4->proc~b64_encode_r8~4 proc~b64_encode_i8~4 b64_encode_I8 proc~b64_encode_up~4->proc~b64_encode_i8~4 proc~b64_encode_string~4 b64_encode_string proc~b64_encode_up~4->proc~b64_encode_string~4 proc~encode_bits~4 encode_bits proc~b64_encode_i4~4->proc~encode_bits~4 proc~b64_encode_i1~4->proc~encode_bits~4 proc~b64_encode_r4~4->proc~encode_bits~4 proc~b64_encode_i2~4->proc~encode_bits~4 proc~b64_encode_r8~4->proc~encode_bits~4 proc~b64_encode_i8~4->proc~encode_bits~4 proc~b64_encode_string~4->proc~encode_bits~4 interface~byte_size byte_size proc~b64_encode_string~4->interface~byte_size proc~byte_size_i1p byte_size_I1P interface~byte_size->proc~byte_size_i1p proc~byte_size_r4p byte_size_R4P interface~byte_size->proc~byte_size_r4p proc~byte_size_i4p byte_size_I4P interface~byte_size->proc~byte_size_i4p proc~byte_size_i8p byte_size_I8P interface~byte_size->proc~byte_size_i8p proc~byte_size_r8p byte_size_R8P interface~byte_size->proc~byte_size_r8p proc~byte_size_i2p byte_size_I2P interface~byte_size->proc~byte_size_i2p proc~byte_size_chr byte_size_chr interface~byte_size->proc~byte_size_chr

Contents

Source Code


Source Code

   subroutine b64_encode_up(up, code)
   !< Encode an unlimited polymorphic scalar to base64.
   !<
   !<```fortran
   !< use befor64
   !< use penf
   !< character(len=:), allocatable :: code64
   !< call b64_encode_up(up=1._R8P, code=code64)
   !< print "(A)", code64
   !<```
   !=> AAAAAAAA8D8= <<<
   class(*),                      intent(in)  :: up   !< Unlimited polymorphic variable to be encoded.
   character(len=:), allocatable, intent(out) :: code !< Encoded scalar.

   select type(up)
   type is(real(R8P))
      call b64_encode_R8(n=up,code=code)
   type is(real(R4P))
      call b64_encode_R4(n=up,code=code)
   type is(integer(I8P))
      call b64_encode_I8(n=up,code=code)
   type is(integer(I4P))
      call b64_encode_I4(n=up,code=code)
   type is(integer(I2P))
      call b64_encode_I2(n=up,code=code)
   type is(integer(I1P))
      call b64_encode_I1(n=up,code=code)
   type is(character(*))
      call b64_encode_string(s=up,code=code)
   endselect
   endsubroutine b64_encode_up