I sent a note to @engel that the strings in the example are not quoted; as that is just an errata.
It would probably be better to read into a fixed-length variable instead of dynamically allocating,
that just saved a few lines but brings up the point that you can dynamically allocate allocatable strings on assignment, which is a relatively new feature versus taking direct control with allocate and deallocate, which as you noted requires you to deallocate manually before reallocating but lets you treat the variable once allocated almost like a fixed-length value.
To handle the ‘.’ you would be better off doing the parsing as described earlier, but you could read everything as a string and then read the string for the numeric value testing for strings like ‘.’ first, but that is just a kludge and at that point a true parsing of the file yourself is actually better. Using BLANK=‘ZERO’ on the OPEN would not do what you want in this case. There are several examples of SPLIT routines available including a working example of one that acts like the proposed SPLIT for the next Fortran release that would let you easily split on a comma and that would be an easier way to go, as doing what I did here would not even properly handle a simple variation like there being a blank in the integer field value.