Statistics
| Revision:

root / src / WriteList.f90 @ 5

History | View | Annotate | Download (933 Bytes)

1
 SUBROUTINE WriteList(Input,Unit)
2

    
3
! This routine reads an input template for Siesta
4

    
5
  use VarTypes
6
  use Io_module
7

    
8
  IMPLICIT NONE
9

    
10
  INTERFACE
11
     function valid(string) result (isValid)
12
       CHARACTER(*), intent(in) :: string
13
       logical                  :: isValid
14
     END function VALID
15

    
16
  END INTERFACE
17

    
18
! Input
19
      TYPE (Input_line), POINTER, INTENT(IN) :: Input
20
      INTEGER(KINT), OPTIONAL, INTENT(IN) :: Unit
21

    
22
  INTEGER(KINT) :: IoWrite
23
  TYPE (Input_line), POINTER :: CurLine
24

    
25
  LOGICAL :: Debug
26

    
27
  Debug=Valid("writeList")
28

    
29
  if (debug) Call Header("Entering WriteList")
30

    
31
  if (present(Unit)) THEN
32
     IoWrite=Unit
33
  ELSE
34
     IoWrite=IOOUT
35
  END IF
36

    
37
  CurLine => Input
38
  WRITE(IoWrite,'(1X,A)') CurLine%Line
39

    
40
  DO WHILE (ASSOCIATED(CurLine%next)) 
41
     CurLine => CurLine%Next
42
     WRITE(IOWrite,'(1X,A)') TRIM(CurLine%Line)
43
  END DO
44

    
45
  if (debug) Call Header("Exiting WriteList")
46

    
47
END SUBROUTINE WRITELIST