Skip to content

Commit

Permalink
cards may now have comments inside them; fixes #67
Browse files Browse the repository at this point in the history
 - lines must start with a $, so a space is not considered a comment
  • Loading branch information
SteveDoyle2 committed Apr 9, 2024
1 parent e76882e commit 30ac91e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/LK1/L1U/NEXTC.f90
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ SUBROUTINE NEXTC ( CARD, ICONT, IERR )
CALL READERR ( IOCHK, INFILE, MESSAG, REC_NO, OUNT, 'Y' )
FATAL_ERR = FATAL_ERR + 1
ENDIF

! we (maybe) found a comment line inside the card
! loop until we find a non-comment line using the same
! block as above
!
! NOTE: comment lines must start with a $, so a space is
! not considered a comment
DO WHILE (TCARD(1:1) == '$')
READ(IN1,101,IOSTAT=IOCHK) TCARD ! Read next card
CARD_IN = TCARD
IF (IOCHK /= 0) THEN
REC_NO = -99
CALL READERR ( IOCHK, INFILE, MESSAG, REC_NO, OUNT, 'Y' )
FATAL_ERR = FATAL_ERR + 1
ENDIF
ENDDO

! Remove any comments within the CARD by deleting everything from $ on (after col 1)

Expand Down

0 comments on commit 30ac91e

Please # to comment.