Prism uses the concepts of current file and current function.
The current file is the source file currently displayed in the source window. The current function is the function or procedure displayed in the source window. You might change the current file or function if, for example, you want to set a breakpoint in a file that is not currently displayed in the source window, and you don't know the line number at which to set the breakpoint.
In addition, changing the current file and current function changes the scope used by Prism for commands that refer to line numbers without specifying a file, as well as the scope used by Prism in identifying variables; see " How Prism Chooses the Correct Variable or Procedure" for a discussion of how Prism identifies variables. The scope pointer (-) in the line-number region moves to the current file or current function to indicate the beginning of the new scope.
To change the current file:
From the menu bar - Choose the File selection from the File menu. A window is displayed, listing in alphabetical order the source files that make up the loaded program. Click on one, and it appears in the Selection box; click on OK, and the source window updates to display the file. Or simply double-click, rapidly, on the source file. You can also edit the file name in the Selection box.
The File window displays only files compiled with the -g switch.
From the command window - Issue the file command, with the name of a file as its argument. The source window updates to display the file.
To change the current function or procedure:
From the menu bar - Choose the Func selection from the File menu. A window is displayed, listing the functions in the program in alphabetical order. (Fortran procedure names are converted to all lowercase.) Click on one, and it appears in the Selection box; click on OK, and the source window updates to display the function. Or simply double-click on the function name in the list. You can also edit the function name in the Selection box.
By default, the Func window displays only functions in files compiled with the -g switch. To display all functions in the program, click on the Select All Functions button. The button then changes to Show -g Functions; click on it to return to displaying only the -g functions.
From the command window - Issue the func command with the name of a function or subroutine as its argument. The source window updates to display the function.
From the source window - Select the name of the function in the source window by dragging the mouse over it while pressing the Shift key. When you let go of the mouse button, the source window is updated to display the definition of this function.
Do not include the arguments with the function, just its name.
Note that if the function you choose is in a different source file from the current file, changing to this function also has the effect of changing the current file.