Skip to content

Commit

Permalink
Use allocatable field
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Mar 10, 2024
1 parent ac06db2 commit 0dde0ce
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/version_f.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ module version_f
public :: try_satisfy

type :: version_t
integer :: major
integer :: minor
integer :: patch
character(:), allocatable :: string
end type

type :: comparator_t
Expand Down Expand Up @@ -59,15 +57,11 @@ subroutine parse_comp_set(this)
allocate (this%comps(0))

comp%op = '>'
comp%version%major = 1
comp%version%minor = 0
comp%version%patch = 1
comp%version%string = '1'
this%comps = [this%comps, comp]

comp%op = '<'
comp%version%major = 2
comp%version%minor = 1
comp%version%patch = 0
comp%version%string = '2'
this%comps = [this%comps, comp]
end
end

0 comments on commit 0dde0ce

Please sign in to comment.