j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
175 stars 14 forks source link

Let new_line() be the same as new_line('A') #243

Open Beliavsky opened 2 years ago

Beliavsky commented 2 years ago

Can the argument of the new_line function be made optional, so that new_line() is equivalent to new_line('A')? I don't often see Fortranners specify a character kind, and new_line will often be concatenated with character variables or literals of the default kind, so if the argument is made optional, in most cases just new_line() will be what they want.

Beliavsky commented 2 years ago

The suggestion has received support from only other person (now three people), and one person has downvoted. I guess the argument against it is that the user can just define

character (len=*), parameter :: new_line_char = new_line("A")

and use new_line_char.