compact_real.f90 Source File

PENF's testing program.


Source Code


Source Code

!< PENF's testing program.
program compact_real
!-----------------------------------------------------------------------------------------------------------------------------------
!< PENF's testing program.
!-----------------------------------------------------------------------------------------------------------------------------------
use penf
use, intrinsic :: ISO_FORTRAN_ENV, only : stdout=>OUTPUT_UNIT
!-----------------------------------------------------------------------------------------------------------------------------------

!-----------------------------------------------------------------------------------------------------------------------------------
implicit none
logical :: test_passed(3) !< List of passed tests.
!-----------------------------------------------------------------------------------------------------------------------------------

!-----------------------------------------------------------------------------------------------------------------------------------
call penf_init

test_passed = .false.

test_passed(1) = trim(str(n=1._R8P, compact=.true.))=='+0.1E+1'
print "(A,L1)", 'Compact 1.0: '//trim(str(n=1._R8P, compact=.true.))//', is correct? ', test_passed(1)

test_passed(2) = trim(str(n=1._R4P/3._R4P, compact=.true.))=='+0.333333E+0'
print "(A,L1)", 'Compact 1.0/3.0: '//trim(str(n=1._R4P/3._R4P, compact=.true.))//', is correct? ', test_passed(2)

test_passed(3) = trim(str(n=1._R16P/4._R16P, compact=.true.))=='+0.25E+0'
print "(A,L1)", 'Compact 1.0/4.0: '//trim(str(n=1._R16P/4._R16P, compact=.true.))//', is correct? ', test_passed(3)

write(stdout, "(A,L1)") new_line('a')//'Are all tests passed? ', all(test_passed)
stop
!-----------------------------------------------------------------------------------------------------------------------------------
endprogram compact_real

Circle.f90 CircleWrapper.f90 CircleWrapperFactory.f90 compact_real.f90 DimensionsWrapper.f90 DimensionsWrapper0D.f90 DimensionsWrapper0D_DLCA.f90 DimensionsWrapper0D_I1P.f90 DimensionsWrapper0D_I2P.f90 DimensionsWrapper0D_I4P.f90 DimensionsWrapper0D_I8P.f90 DimensionsWrapper0D_L.f90 DimensionsWrapper0D_R4P.f90 DimensionsWrapper0D_R8P.f90 DimensionsWrapper1D.f90 DimensionsWrapper1D_DLCA.f90 DimensionsWrapper1D_I1P.f90 DimensionsWrapper1D_I2P.f90 DimensionsWrapper1D_I4P.f90 DimensionsWrapper1D_I8P.f90 DimensionsWrapper1D_L.f90 DimensionsWrapper1D_R4P.f90 DimensionsWrapper1D_R8P.f90 DimensionsWrapper2D.f90 DimensionsWrapper2D_DLCA.f90 DimensionsWrapper2D_I1P.f90 DimensionsWrapper2D_I2P.f90 DimensionsWrapper2D_I4P.f90 DimensionsWrapper2D_I8P.f90 DimensionsWrapper2D_L.f90 DimensionsWrapper2D_R4P.f90 DimensionsWrapper2D_R8P.f90 DimensionsWrapper3D.f90 DimensionsWrapper3D_DLCA.f90 DimensionsWrapper3D_I1P.f90 DimensionsWrapper3D_I2P.f90 DimensionsWrapper3D_I4P.f90 DimensionsWrapper3D_I8P.f90 DimensionsWrapper3D_L.f90 DimensionsWrapper3D_R4P.f90 DimensionsWrapper3D_R8P.f90 DimensionsWrapper4D.f90 DimensionsWrapper4D_DLCA.f90 DimensionsWrapper4D_I1P.f90 DimensionsWrapper4D_I2P.f90 DimensionsWrapper4D_I4P.f90 DimensionsWrapper4D_I8P.f90 DimensionsWrapper4D_L.f90 DimensionsWrapper4D_R4P.f90 DimensionsWrapper4D_R8P.f90 DimensionsWrapper5D.f90 DimensionsWrapper5D_DLCA.f90 DimensionsWrapper5D_I1P.f90 DimensionsWrapper5D_I2P.f90 DimensionsWrapper5D_I4P.f90 DimensionsWrapper5D_I8P.f90 DimensionsWrapper5D_L.f90 DimensionsWrapper5D_R4P.f90 DimensionsWrapper5D_R8P.f90 DimensionsWrapper6D.f90 DimensionsWrapper6D_DLCA.f90 DimensionsWrapper6D_I1P.f90 DimensionsWrapper6D_I2P.f90 DimensionsWrapper6D_I4P.f90 DimensionsWrapper6D_I8P.f90 DimensionsWrapper6D_L.f90 DimensionsWrapper6D_R4P.f90 DimensionsWrapper6D_R8P.f90 DimensionsWrapper7D.f90 DimensionsWrapper7D_DLCA.f90 DimensionsWrapper7D_I1P.f90 DimensionsWrapper7D_I2P.f90 DimensionsWrapper7D_I4P.f90 DimensionsWrapper7D_I8P.f90 DimensionsWrapper7D_L.f90 DimensionsWrapper7D_R4P.f90 DimensionsWrapper7D_R8P.f90 DLACWrapperFactory.f90 ErrorMessages.f90 ExtendWrappers.f90 FortranParameterList_Example.f90 FPL.f90 FPL_utils.f90 I1PWrapperFactory.f90 I2PWrapperFactory.f90 I4PWrapperFactory.f90 I8PWrapperFactory.f90 LWrapperFactory.f90 ParameterEntry.f90 ParameterEntryDictionary.f90 ParameterList.f90 ParameterList_Test.f90 ParameterList_Wrapper0D_Test.f90 ParameterList_Wrapper1D_Test.f90 ParameterList_Wrapper2D_Test.f90 ParameterList_Wrapper3D_Test.f90 ParameterList_Wrapper4D_Test.f90 ParameterList_Wrapper5D_Test.f90 ParameterList_Wrapper6D_Test.f90 ParameterList_Wrapper7D_Test.f90 ParameterListIterator_Test.f90 ParameterRootEntry.f90 R4PWrapperFactory.f90 R8PWrapperFactory.f90 WrapperFactory.f90 WrapperFactoryList.f90 WrapperFactoryList_DLCA_Test.f90 WrapperFactoryList_I1P_Test.f90 WrapperFactoryList_I2P_Test.f90 WrapperFactoryList_I4P_Test.f90 WrapperFactoryList_I8P_Test.f90 WrapperFactoryList_L_Test.f90 WrapperFactoryList_R4P_Test.f90 WrapperFactoryList_R8P_Test.f90 WrapperFactoryListSingleton.f90