program Test2

! Nalezeni poloh delicich carek
! test real2str

use std_type
use VstupVystup
use japigraf

implicit none

!intrinsic :: modulo
real(kind=DP) :: OdX, Ukrok,Ux1vd,zbytek
character(len=20) :: cislo1, cislo2
integer :: delka1,delka2

call Cti_Cislo("Zadej OdX : ",OdX)
call Cti_Cislo("Zadej krok deleni : ",Ukrok)

zbytek = modulo(Odx,Ukrok)
print *,"modulo(OdX,Ukrok) = ",zbytek
Ux1vd = OdX - zbytek
if (zbytek > 0) Ux1vd = Ux1vd + Ukrok

print *, "Ux1vd = ", ux1vd

call Real2Str(OdX,cislo1,delka1)
call Real2Str(ux1vd,cislo2,delka2)

print *,"OdX =",cislo1(:delka1)
print *,"Ux1vd =",cislo2(:delka2)

print*,"LEN(cstr) = ",len(cislo2)
print*,"LEN_TRIM(cstr) = ",len(cislo2(:delka2))

read *

end program Test2
