SUBROUTINE CARDIN read requested card, A80, to COMMON /SCRACH/
SUBROUTINE RDINTG read integer
SUBROUTINE RDREAL read real number
SUBROUTINE RDWORD read word
SUBROUTINE RDWRDS read all remaining words on a card
SUBROUTINE RDNUMS read all remaining numbers on a card.
In the COMMON /CARDRC/ INREAD(24) holds the position in the temporary file (unit IO10) at which X cards start, if there are any, and ICDNO(24) holds the number of X cards read by PREFIN.
So, having declared COMMON /CARDRC/ and COMMON /SCRACH/ at the start, the sequence:
N=ICDNO(24) IF (N .GT. 0) THEN ID=INREAD(24) DO 1 I=1,N CALL CARDIN(ID) ID=ID+NYZ ........
a piece of code to extract your information off the card
........ 1 CONTINUE ENDIF
etc
will read and interpret a set of X cards.
If the user wants to use X cards for more elaborate input, in the same way, for example, as L or M cards, he could use FUNCTION ONCARD which looks for an X card with a given CCSL-word, or SUBROUTINE FINDCD which will read the next X card with a given CCSL-word.
NOTE:
The instruction ID=ID+NYZ rather than ID=ID+1 is needed to skip over any Y or Z cards which may be interleaved with the X cards.