Removed redundant subroutine
This commit is contained in:
parent
4b880d7718
commit
9394b9bdfb
4 changed files with 12 additions and 25 deletions
|
@ -11,9 +11,14 @@ F_OPTS := -fpic -I $(BUILD_DIR)
|
||||||
|
|
||||||
else
|
else
|
||||||
F_OPTS := -fpic -module $(BUILD_DIR)
|
F_OPTS := -fpic -module $(BUILD_DIR)
|
||||||
|
|
||||||
ifdef debug
|
ifdef debug
|
||||||
|
ifeq ($(F),ifx)
|
||||||
|
F_OPTS += -g
|
||||||
|
else
|
||||||
F_OPTS += -ggdb -debug-parameters used
|
F_OPTS += -ggdb -debug-parameters used
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
19
app/main.f90
19
app/main.f90
|
@ -26,13 +26,11 @@ program hp15c
|
||||||
integer :: n_seq = 0
|
integer :: n_seq = 0
|
||||||
|
|
||||||
logical :: veMode = .false.
|
logical :: veMode = .false.
|
||||||
logical :: lang_en = .true.
|
|
||||||
logical :: tmp_cmode
|
logical :: tmp_cmode
|
||||||
logical :: ok
|
logical :: ok
|
||||||
logical :: have_expression
|
logical :: have_expression
|
||||||
integer :: stat
|
integer :: stat
|
||||||
character(len=100) :: msg
|
character(len=100) :: msg
|
||||||
character(5) :: lang
|
|
||||||
|
|
||||||
type(rpn_t) :: mem(0:9) = rpn_t()
|
type(rpn_t) :: mem(0:9) = rpn_t()
|
||||||
|
|
||||||
|
@ -53,16 +51,9 @@ program hp15c
|
||||||
call constants%set('two_pi',2*pi)
|
call constants%set('two_pi',2*pi)
|
||||||
call constants%set('pi_over_2',pi/2)
|
call constants%set('pi_over_2',pi/2)
|
||||||
|
|
||||||
! Try to read the LANG environment variable
|
! Decimal places
|
||||||
call get_environment_variable('LANG',lang,status=stat)
|
call set_places(dec_places)
|
||||||
lang_en = stat /= 0
|
|
||||||
if (.not. lang_en) then
|
|
||||||
lang_en = merge(.true.,.false.,lang(1:3) == 'en_')
|
|
||||||
end if
|
|
||||||
lang = merge('POINT','COMMA',lang_en)
|
|
||||||
|
|
||||||
call init(lang)
|
|
||||||
|
|
||||||
! Interrogate argument list
|
! Interrogate argument list
|
||||||
argc = command_argument_count()
|
argc = command_argument_count()
|
||||||
have_expression = .false.
|
have_expression = .false.
|
||||||
|
@ -106,7 +97,6 @@ program hp15c
|
||||||
if (.not. ok) stop
|
if (.not. ok) stop
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
if (.not. have_expression) then
|
if (.not. have_expression) then
|
||||||
call stack%print(veMode)
|
call stack%print(veMode)
|
||||||
end if
|
end if
|
||||||
|
@ -624,6 +614,7 @@ contains
|
||||||
|
|
||||||
case default
|
case default
|
||||||
! Process constants first
|
! Process constants first
|
||||||
|
print *,'apply_command: default'
|
||||||
block
|
block
|
||||||
integer :: lc,split_idx,end_idx
|
integer :: lc,split_idx,end_idx
|
||||||
character(len=:), allocatable :: re_comp, im_comp
|
character(len=:), allocatable :: re_comp, im_comp
|
||||||
|
@ -661,8 +652,10 @@ contains
|
||||||
else
|
else
|
||||||
if (constants%contains(command)) then
|
if (constants%contains(command)) then
|
||||||
x = constants%get_value(command)
|
x = constants%get_value(command)
|
||||||
|
print *,command//' is constant = ',x
|
||||||
else if (stats%contains(command)) then
|
else if (stats%contains(command)) then
|
||||||
x = stats%get_value(command)
|
x = stats%get_value(command)
|
||||||
|
print *,command//' is stats'
|
||||||
else
|
else
|
||||||
read(command,*,err=901,end=901) x
|
read(command,*,err=901,end=901) x
|
||||||
end if
|
end if
|
||||||
|
|
|
@ -417,10 +417,6 @@ module rpn_stack
|
||||||
real(real64), intent(in) :: x
|
real(real64), intent(in) :: x
|
||||||
real(real64) ::r
|
real(real64) ::r
|
||||||
end function round
|
end function round
|
||||||
|
|
||||||
module subroutine init(lang)
|
|
||||||
character(5), intent(in), optional :: lang
|
|
||||||
end subroutine init
|
|
||||||
|
|
||||||
module subroutine set_places(n)
|
module subroutine set_places(n)
|
||||||
integer, intent(in) :: n
|
integer, intent(in) :: n
|
||||||
|
|
|
@ -27,7 +27,7 @@ contains
|
||||||
write(output_unit,'(dt)') stk%sdata(i)
|
write(output_unit,'(dt)') stk%sdata(i)
|
||||||
end do
|
end do
|
||||||
else
|
else
|
||||||
write(6,fmt='(dt)') stk%sdata(1)
|
write(output_unit,fmt='(dt)') stk%sdata(1)
|
||||||
end if
|
end if
|
||||||
end subroutine print_stackt
|
end subroutine print_stackt
|
||||||
|
|
||||||
|
@ -155,7 +155,6 @@ contains
|
||||||
character(*), intent(inout) :: iomsg
|
character(*), intent(inout) :: iomsg
|
||||||
complex(8) :: z
|
complex(8) :: z
|
||||||
character(len=:), allocatable :: str_re, str_im
|
character(len=:), allocatable :: str_re, str_im
|
||||||
|
|
||||||
z = se%zdata
|
z = se%zdata
|
||||||
if (complex_mode) then
|
if (complex_mode) then
|
||||||
call to_string(z%re,str_re)
|
call to_string(z%re,str_re)
|
||||||
|
@ -736,12 +735,6 @@ contains
|
||||||
r = x
|
r = x
|
||||||
end if
|
end if
|
||||||
end function round
|
end function round
|
||||||
|
|
||||||
module subroutine init(lang)
|
|
||||||
character(5), intent(in), optional :: lang
|
|
||||||
if (present(lang)) decimal = lang
|
|
||||||
call set_places(dec_places)
|
|
||||||
end subroutine init
|
|
||||||
|
|
||||||
module subroutine set_places(n)
|
module subroutine set_places(n)
|
||||||
integer, intent(in) :: n
|
integer, intent(in) :: n
|
||||||
|
|
Loading…
Reference in a new issue