Use a_module, only : very_long_stuff, going_on_for_too_long

How do I break up this line into multilines. The continuation character does not seem to work.

use asdmod, only : as1,as2,s_stscpu,s_strdc2,s_stsdta,s_stsdtn, &
       s_stsdtx

Produces:

        use asdmod, only : as1,as2,s_stscpu,s_strdc2,s_stsdta,s_stsdtn, &
                                                                      1
Error: Missing generic specification in USE statement at (1)

Is there something other than a blank between ',' and '&' ? In particular some compilers don’t like tabs. Are some of the things in asdmod generic?

Your’e missing a leading & on the second line it looks like.

I’m afraid we need to see more code to understand the error.

Leading & on the continuation lines are not required.

You can also split it this way, if you prefer:

use asdmod, only: as1, as2, s_stscpu, s_strdc2, s_stsdta
use asdmod, only: s_stsdtn, s_stsdtx
2 Likes