tags:

views:

12

answers:

0

In fortran, what would be the practical way to read:

 A 1. 2. 3.   

if the first character is an "A", but to not read the

 Z

rest if the first character is a "Z" for example.

If I try to read the line at whole,

read(1,*)char, number1, number2, number3

then an error will occur if the numbers are missing. So I need a way to read an "A" stay on that line, and depending on the "A" or a "Z" read, if needed the rest.

All ideas welcomed.