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