Number of characters in one line in free-format in Fortran90

Number of characters in one line in free-format in Fortran90

Аватар пользователя Nazmul I.

Does Fortran90 allow to write more than 132 charactes in a line in free-format? If I write more than 132 characters in a line in free-format Fortran90, what will happen then?

7 сообщений / 0 новое
Последнее сообщение
Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.
Аватар пользователя David White

According to the documentation, compiler limits are:

Fortran source line length fixed form: 72 (or 132 if /extend_source is in effect) characters;

free form: 7200 characters

However, for readability and code maintenance, I would suggest shorter lines are best!

Аватар пользователя Nazmul I.

Thanks, David White for your valuable information!

Аватар пользователя app4619

Enforcing standards for free form warns for over 132 (or is it 128?).

Аватар пользователя Steve Lionel (Intel)

132 is what the standard says.

Steve
Аватар пользователя Nazmul I.

Thanks Steve Lionel for giving the information. However, can you tell me that what will happen if I write more than 132 character in one line?

Аватар пользователя Steve Lionel (Intel)

By default, it will work fine. We support, as an extension, a much longer line. If you ask for standards warnings, you'll get a warning.

I'd discourage you from doing this, though, as it's not portable.

Steve

Зарегистрируйтесь, чтобы оставить комментарий.