Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

Unhelpful error message array section assignment

$
0
0

I am attempting to assign an array section, e.g.

X(1:N) = Y(1:N)

In the situation that Y has not been declared, the compiler only seems to look at the RHS of the statement, and so assumes that Y is intended to be of CHARACTER type, failing to recognize that the notation also could be an array section.  Since the destination is an array section, then error message 6514 is misleading.

Error 1  error #6404: This name does not have a type, and must have an explicit type.   [UNDECLAREDVAR] C:\Open\kwc54dw\Dev\Winyldmd\trunk\ymd_commands\Show_Stage.f90 107 
Error 2  error #6514: A substring must be of type CHARACTER.   [UNDECLAREDVAR] C:\Open\kwc54dw\Dev\Winyldmd\trunk\ymd_commands\Show_Stage.f90 107 
Error 3  error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands.   [UNDECLAREDVAR] C:\Open\kwc54dw\Dev\Winyldmd\trunk\ymd_commands\Show_Stage.f90 107 
 


Viewing all articles
Browse latest Browse all 1424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>