Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Variables in read statement io-list - intellisense not working

davidspurr
Beginner
236 Views

Intel(R) Visual Fortran     Package ID: w_fcompxe_2013.4.190
Intel(R) Visual Fortran Composer XE 2013 Update 4 Integration for Microsoft Visual Studio* 2010, 13.0.3624.2010

Apologies if this has already been raised but could not see anything from a quick scan of the first few pages.

Recent versions now have implemented intellisense features such as 'go to definition' and 'find all references' in the text editior.  Very handy.

But I am seeing one anomaly.  The intellisense does not appear to recognise variables in a read statement io-list as variables; eg.

  • Normally hover mouse over a variable the variable definition is displayed (or rather partly display the definition - would be nice if for example it showed the declared length of character variables) 
  • However, if the variable is in the io-list of a read statement this does not occur (yet does when in the io-list of a write statement!)
  • If right click on the variable in the io-list of a read statement it brings up all the standard options, but 'go to definition' does not work
  • 'find all references' does - partly.  It locates all references except those in read statement io-lists

I assume this is not intended behaviour? 

Any fix in site?

0 Kudos
6 Replies
Steven_L_Intel1
Employee
236 Views

I can reproduce this - other than the character length which does work for me. I will report it to the developers.

Steven_L_Intel1
Employee
236 Views

The following do work:

WRITE (unit,fmt)
PRINT fmt
READ fmt

the following don't work:

READ (unit, fmt)
ACCEPT fmt

Escalated as issue DPD200249465

davidspurr
Beginner
236 Views

Thanks for quick response Steve

davidspurr
Beginner
236 Views

Following up on the 'character' issue.

As per the attached image, intellisense does not display the length of character variables on my system. 

Is there some option I have to turn on to get this to work?

Steven_L_Intel1
Employee
236 Views

The issue with READ is fixed for a future update. David, this image doesn't tell me very much. I don't know what the declaration of the variable is nor which version you're using.

davidspurr
Beginner
236 Views

Version given in my first post; ie.

Intel(R) Visual Fortran     Package ID: w_fcompxe_2013.4.190
Intel(R) Visual Fortran Composer XE 2013 Update 4 Integration for Microsoft Visual Studio* 2010, 13.0.3624.2010
VS has SP1 (& SP1 updates!) applied

OS is Vista.  Also I have a new PC in the process of 'commissioning' running Windows 8.1 (same compiler version).  Get the same behaviour.

======
Yes, I realised later I had forgotten to give the declaration. 

Declaration for 'gline' is: [fortran]character(300) gline[/fortran]

Would be good if the intellisense displayed this as 'CHARACTER(30) :: gline' rather than just 'CHARACTER :: gline'

======
A similar behaviour occurs for other types of variables; eg. have a variable 'car' declared as [fortran]real(dp) car[/fortran], where dp is declared in a module as

 [fortran]   integer, parameter :: dp = selected_real_kind(14) [/fortran]

Intellisense displays car as 'REAL :: car'   ['REAL(dp) :: car' would be better :)]

======
I just found another set of cases where intellisense does not work; eg. in my example above ([fortran]real(dp) car[/fortran]), intellisense does not work for variable 'dp'. 

eg. hover mouse above 'dp' displays nothing, go to definition does nothing, find all references finds only the declaration of 'dp' in the module - not the multiple other uses of 'dp' for variable declarations throughout the program.

Similar applies for integer; eg. does not work for variable 'i2b' in [fortran]integer(i2b) OB[/fortran].

I have not investigated all the permutations on this case

Reply