Pregunta

I'm trying to put some data in a fortran file in the form of a string(about 15000 characters long), and received the error when compiled with intel fortran:

catastrophic error: Token too long, max is 7194. Last token on line -4611686018407622524

Does anyone know how to deal with it?

The compiler version is 13.0.0. The same file can be compiled with IBM xlf fortran compiler and gfortran without problem.

The fortran file is here

¿Fue útil?

Solución

The compiler's tokenizer seems to have a maximum acceptable length for tokens ; the string you wrote has too many characters. Try cutting the string in two parts (in two variables) and concatenate them.

Otros consejos

It is a limitation of the Intel Fortran Compiler and still present in the current version 14.0. I had posted about it in the Intel forums but cannot find it with their search function.

In my program I had to change from a large character constant initialized in the type declaration to a variable and multiple assign statements.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top