Format: add trailing spaces to character output to left-justify

前端 未结 5 2063
渐次进展
渐次进展 2021-01-06 11:34

How do you format a string to have constant width and be left-justified? There is the Aw formatter, where w denotes desired width of chara

5条回答
  •  长发绾君心
    2021-01-06 11:57

    a bit ugly but you can concatenate a blank string:

        character*15 :: blank=' '
        print 44, 'Hi Stack Overflow'//blank
    

提交回复
热议问题