Program compile

program compile

        ! Uses
    use mpsge

        ! Calls
    call buildmodel
    call chkdemand
    call chkprod
    call functions
    call indices
    call parse
    call readcoef
    call readmps
    call readnest
    call readvar
    call sectors
    call testsym
    call writemodel

        ! Types
    type gmsrecord

        ! Variables
    type (gmsrecord), pointer :: gmsrecords
    type (gmsrecord), pointer :: lastrecord
    character (len=255) :: fname

        ! Subroutines and functions
    subroutine testsym ()
    subroutine fnecho ()
    subroutine nlist (sn)
    subroutine elist (el)
    subroutine indices ()
    subroutine buildmodel ()
    subroutine writemkt (s)
    subroutine writenetput (np, fn, rec)
    subroutine writeendowment (e, fn, rec)
    subroutine writefinaldemand (fn, rec)
    subroutine dchk (set, dm, domainele)
    subroutine writename (name, prefix, domain, indx)
    subroutine setalias (set, domain)
    subroutine functions ()
    subroutine cobbdouglas (n, fnf, rec)
    subroutine ces (n, fnf, rec)
    subroutine leontief (n, fnf, rec)
    logical function defined (n)
    subroutine nextnest (n)
    subroutine formv (f, default, value)
    subroutine noparens (value)
    subroutine writegms (rectype, lrec, rrec)
    subroutine writemodel ()
    subroutine writetype (tabin, type)

end program compile

Description of Types

gmsrecord

type gmsrecord
    character (len=1024) :: left
    character (len=1024) :: right
    character (len=32) :: type
    type (gmsrecord), pointer :: next
end type gmsrecord

Description of Variables

gmsrecords

type (gmsrecord), pointer :: gmsrecords

lastrecord

type (gmsrecord), pointer :: lastrecord

fname

character (len=255) :: fname

Description of Subroutines and Functions

testsym

subroutine testsym ()
    ! Calls: writegms
end subroutine testsym

fnecho

subroutine fnecho ()
    ! Calls: elist, nlist
end subroutine fnecho

nlist

subroutine nlist (sn)
    type (nestlist), pointer :: sn
end subroutine nlist

elist

subroutine elist (el)
    type (netputlist), pointer :: el
    ! Calls: writedomain
end subroutine elist

indices

subroutine indices ()
    ! Calls: nextnest
end subroutine indices

buildmodel

subroutine buildmodel ()
    ! Calls: tab2blank, writegms, writemkt, writeparam
end subroutine buildmodel

writemkt

subroutine writemkt (s)
    type (symbol), pointer :: s
    ! Calls: nextnest, writedomain, writeendowment, writefinaldemand, writegms, writenetput
end subroutine writemkt

writenetput

subroutine writenetput (np, fn, rec)
    type (netput), pointer :: np
    type (function), pointer :: fn
    character (len=*) :: rec
    ! Calls: dchk, domainlabels, setalias, writename
end subroutine writenetput

writeendowment

subroutine writeendowment (e, fn, rec)
    type (endowment), pointer :: e
    type (function), pointer :: fn
    character (len=*) :: rec
    ! Calls: dchk, domainlabels, setalias, writename
end subroutine writeendowment

writefinaldemand

subroutine writefinaldemand (fn, rec)
    type (function), pointer :: fn
    character (len=*) :: rec
    ! Calls: dchk, domainlabels, setalias, writename
end subroutine writefinaldemand

dchk

subroutine dchk (set, dm, domainele)
    character (len=32) :: set
    character (len=32), dimension (10) :: dm
    logical :: domainele
end subroutine dchk

writename

subroutine writename (name, prefix, domain, indx)
    character (len=*) :: name
    character (len=*) :: prefix
    character (len=32), dimension (10) :: domain
    integer :: indx
end subroutine writename

setalias

subroutine setalias (set, domain)
    character (len=32) :: set
    character (len=32), dimension (10) :: domain
end subroutine setalias

functions

subroutine functions ()
    ! Calls: ces, cobbdouglas, formv, leontief, nextnest, noparens, writedomain, writegms, writeparam
end subroutine functions

cobbdouglas

subroutine cobbdouglas (n, fnf, rec)
    type (nest), pointer :: n
    type (field), pointer :: fnf
    character (len=*) :: rec
    ! Calls: writedomain, writeparam
end subroutine cobbdouglas

ces

subroutine ces (n, fnf, rec)
    type (nest), pointer :: n
    type (field), pointer :: fnf
    character (len=*) :: rec
    ! Calls: writedomain, writeparam
end subroutine ces

leontief

subroutine leontief (n, fnf, rec)
    type (nest), pointer :: n
    type (field), pointer :: fnf
    character (len=*) :: rec
    ! Calls: writedomain, writeparam
end subroutine leontief

defined

logical function defined (n)
    type (nest), pointer :: n
end function defined

nextnest

subroutine nextnest (n)
    type (nest), pointer :: n
end subroutine nextnest

formv

subroutine formv (f, default, value)
    type (field), pointer :: f
    character (len=*), intent(in) :: default
    character (len=*), intent(out) :: value
end subroutine formv

noparens

subroutine noparens (value)
    character (len=*) :: value
end subroutine noparens

writegms

subroutine writegms (rectype, lrec, rrec)
    character (len=*) :: rectype
    character (len=*) :: lrec
    character (len=*) :: rrec
end subroutine writegms

writemodel

subroutine writemodel ()
    ! Calls: writetype
end subroutine writemodel

writetype

subroutine writetype (tabin, type)
    integer :: tabin
    character (len=*) :: type
end subroutine writetype