- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wondering if exists (in Visual Fortran 10.1.029) some kind of macro/directive that allows to get the current source code line number.
In fact, in a WRITE statement I would like to put as part of the output string the current line code.
Does anything similar also exist to get the current source code file name?
Thank you,
regards.
In fact, in a WRITE statement I would like to put as part of the output string the current line code.
Does anything similar also exist to get the current source code file name?
Thank you,
regards.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - giovanni_81
I was wondering if exists (in Visual Fortran 10.1.029) some kind of macro/directive that allows to get the current source code line number.
In fact, in a WRITE statement I would like to put as part of the output string the current line code.
Does anything similar also exist to get the current source code file name?
Thank you,
regards.
In fact, in a WRITE statement I would like to put as part of the output string the current line code.
Does anything similar also exist to get the current source code file name?
Thank you,
regards.
You can use the C-preprocessor for that.
You need to set Fortran->Preprocessor->Preprocess Source File to YES, then you can use __LINE__ to get the line number in the code.
Best regards,
Thomas

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page