One way to do this is to edit the shell script `fort', if you use it.
An alternative is to let a Makefile handle your compilation for you. You can copy my Makefile from ~djcm1/examples/Makefile. Then to compile ex0.go, you simply type
make ex0.goThis command causes the necessary compilation commands to be executed.
ex0.goin a window, then what you should do is type
ups ex0.goinstead. This will cause an xwindow to come up containing your source code, a list of useful variables and subroutines, and a load of buttons. To run your code as normal, click on "start". To stop the executation of the code, click on "stop". To examine the value of a variable, click on the name of the variable in your code. Its value should appear in the upper window. To step through your code one line at a time (and step into routines), press "step"; to continue execution to the next line (without visibly stepping into routines) press "next". When a variable changes value, the value in the upper window will change colour. Neat hey?
make ex0.ups
ups commandand if your command normally has arguments, you can include them thus
ups command -a 'arguments'
export UPS_LANGUAGE UPS_LANGUAGE=C++[These commands could be added to your .bash_profile if you decide you want to use ups frequently]
ex0.goin a window, then what you should do is type
ups ex0.go -nodemangleinstead. This will cause an xwindow to come up containing your source code, a list of useful variables and subroutines, and a load of buttons. To run your code as normal, click on "start". To stop the executation of the code, click on "stop". To examine the value of a variable, click on the name of the variable in your code. Its value should appear in the upper window. To step through your code one line at a time (and step into routines), press "step"; to continue execution to the next line (without visibly stepping into routines) press "next". When a variable changes value, the value in the upper window will change colour. Neat hey? Why is it necessary to assert that the language is C++ and why is the `nodemangle' flag required? Well, this is because of the strange properties of fortran. In particular, fortran compiliers insist on adding "_" to variable names, instead of leaving the variable names as they are in the source code. The above two hacks get around this oddity and give a working debugger.