Discussion Overview
The discussion revolves around an error encountered when compiling FORTRAN code in Visual Studio, specifically related to the use of the intrinsic subroutine getcwd. Participants explore potential causes and solutions for the error message received during compilation.
Discussion Character
- Technical explanation
- Debate/contested
Main Points Raised
- One participant expresses uncertainty about the error and seeks assistance, noting their lack of experience with FORTRAN.
- Another participant suggests that the return type of the getcwd function may need to be defined, referencing documentation that indicates getcwd can be used as either a procedure or a function.
- A participant clarifies that getcwd is an intrinsic subroutine and should be called as a subroutine rather than a function that returns a value.
- It is noted that the documentation for getcwd indicates it can return a status, but the invocation style must be chosen correctly.
- One participant shares their successful experience with a short program, questioning whether the issue might be related to the specific compiler being used.
- Another participant suggests trying the subroutine style call for getcwd and mentions the possibility of the compiler misinterpreting the call.
- A participant mentions finding a source that prototypes getcwd, suggesting that this might be necessary due to its dual invocation styles and recommends ensuring the status variable is appropriately typed.
- A participant acknowledges the suggestions and indicates they will try them, mentioning they are using Visual Studio with Intel Fortran Compiler (IVF).
Areas of Agreement / Disagreement
Participants present multiple competing views on how to correctly invoke getcwd and address the error, with no consensus reached on a single solution.
Contextual Notes
There are unresolved aspects regarding the specific compiler behavior and the implications of using getcwd in different invocation styles. The discussion also reflects varying levels of familiarity with FORTRAN among participants.
Who May Find This Useful
Individuals working with FORTRAN in Visual Studio, particularly those encountering similar compilation errors or seeking clarification on the use of intrinsic subroutines.