175. Use an implied do loop with a dummy variable to skip fields when reading a file.#
topic: Input and Output
Note
This tip is a draft1.
To skip reading N fields of a space- or comma-delimited file, a dummy variable can be read N times in an implied do loop before the actual data is read. A READ with no items skips a line in a file.
To skip reading N fields of a space- or comma-delimited file, a dummy variable can be read N times in an implied do loop before the actual data is read. A READ with no items skips a line in a file.pic.twitter.com/KGhVGgiZrW
— FortranTip (@fortrantip) April 2, 2022
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.