Unraveling the Mystery of 'rfac' in Fortran

  • Thread starter Thread starter mushi
  • Start date Start date
  • Tags Tags
    Fortran Mystery
Click For Summary

Discussion Overview

The discussion revolves around the meaning and usage of 'rfac' in Fortran, particularly in the context of a codebase that the original poster is trying to understand and adapt for use in Matlab. The inquiry seeks clarification on whether 'rfac' is a built-in function or a user-defined entity within the code.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant expresses confusion about the term 'rfac' and requests clarification on its function in Fortran.
  • Another participant suggests that 'rfac' might be a locally defined variable or function, indicating that it may not be a standard Fortran function.
  • A participant notes that a Google search reveals many instances of 'rfac' but emphasizes that it appears to be defined within specific codebases.
  • There is a recommendation to perform a text search for 'rfac' across all Fortran source files to identify its usage and definition.
  • Another participant mentions using 'grep' on Linux to find all occurrences of 'rfac', suggesting that this method can provide insights into how 'rfac' is utilized in the code.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the nature of 'rfac', with multiple viewpoints presented regarding its definition and usage. The discussion remains unresolved as to whether 'rfac' is a built-in function or a user-defined element.

Contextual Notes

Limitations include the lack of specific context regarding the code in which 'rfac' is used, as well as the absence of a definitive definition or explanation of 'rfac' from the original poster.

mushi
Messages
23
Reaction score
0
Hi guys,

I know I may sound stupid to me many of you but can anybody tell me what does 'rfac' do in Fortran.
 
Engineering news on Phys.org
I don't understand your question. Can you provide some context?
 
Actually I am working on a code that has been written by someone else and I found 'rfac(X)' in that code. The code is written in Fortran and I am trying to use it in Matlab. I have checked everywhere but could not find any function named 'rfac'.

I hope I am clear now.
 
my guess is it's a locally defined variable or function.

a google search on 'rfac fortran' turns up lots of incidences but in ones i found it was defined in the code.
maybe something passed to a sub?

can you do text search on the program?
 
have you done a text search for rfac in all your fortran sources? I usually work on Linux and a 'grep' for a given function or variable name returns all the places where is being used...you can gain a lot of insight very quickly by viewing all the usage for a given variable/function.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
7K
Replies
7
Views
3K
  • · Replies 62 ·
3
Replies
62
Views
14K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 20 ·
Replies
20
Views
6K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 4 ·
Replies
4
Views
8K