You can use either the Macintosh or the Indigo workstations for entering and testing your program. An Indigo workstation must be used for viewing the graphics generated for Project A, whilst a Macintosh must be used for viewing the spectral output from project B.
On the Macintosh, only the delete key is available, but confusingly it occupies the same keyboard position as the backspace key on the Indigo! To obtain a backspace effect on the Mac, press the Ctrl and H keys simultaneously.
At this stage, text can now be typed in from the keyboard.
The display at the bottom of the
editor indicates both the line and column position of the
cursor . Fortran programming statements
must appear in column 7 onwards, and must not be wider than
column 120. Depending on the workstation screen you are
using, you may only be able to see about 50 columns and
about 16 lines at a time. To inspect the rest of the file,
you will have to use either the vertical or horizontal
"scroll bars" as indicated below. The editor window can
also be resized by placing the mouse cursor on an edge or
on the bottom right hand corner and "dragging" the window
to a new size.
The next advisable action is to save your
program with a more descriptive file name;
Note particularly to select the entire default entry (untitled.f) and replace it with your own name in the dialog box where the file name is entered. At this point a backup file will also be created called yourfilename.bakup. If you suffer a major disaster during editing, you can always revert to this backup file.
To move or delete a portion of text, select it
first with the mouse (using the left mouse button on the
Indigo) and then use the Edit menu to manipulate the
text;
Cutting text copies
it to a "clipboard" ready for pasting elsewhere, whilst
clearing selected text removes it entirely. Note
that if you make a mistake, the last command can be
"undone". Particular occurances of strings in the
text can be "searched" for as follows;
At regular intervals, you should save your file to hard disk. Only after this has been done can another program (e.g. the Fortran compiler) access the changes you may have made to it. Likewise, any changes in a listing or data file produced during compilation will not automatically appear in an editor window unless the file is opened again in the editor. You can have several files open in the editor simultaneously, but you need to "open" each. For example, you may have the prog.f file in one window, and the prog.lis file in another. Remember to re-open the file every time it changes (it is not updated automatically). For further help, invoke that menu item as shown above.
On a Macintosh only, you can switch between the editing and console windows by selecting the Window item at the top of the screen.
The complete listing will be printed on a line printer in the Centre for Computing services (level 4, Mech Eng), from whence you will have to collect it. It is a good idea to put your name and department as a comment line in your program, in case the listing gets lost!
From the Apple menu,
select the following sequence; Chooser,
Appleshare, ch.ethertalk2, AUFS
Server Neon, and finally the OK button.
. Select the
standard login method, then type your Indigo account name
and its password;
You will have the option of mounting
an item corresponding to your unix log-in account
(shown as rzepa
here). Click on OK, whereupon an icon with your id as its
name will appear on the Mac desktop.
Next, you might wish to
make an alias of the icon with your id as follows. Select
the ionc first using a single click, then;
This alias file can then be copied to your own floppy disk, which is taken away when you finish your session. Next time you want to mount your Indigo filebase for use on the Macintosh, insert this floppy disk and double click the alias file. After prompting for your password, the icon with your id should remount ready for use again.
If you double click on
this icon to open the folder,
the contents of your Indigo directory will be listed.
You can treat this directory as any other Macintosh folder, copying files into or out of this area.
Double click on an existing yourprog.f type
file
in this area (if your want instead to create a new
file, proceed as indicated here on any file in your space,
but then following the following instructions.) A dialog box will appear showing all the
available programs that are capable of reading this file;
. Select BBedit;
The editor is quite similar
in operation to most word processors, and you should soon get
the hang of it. To save the file, select first
the file type;
and then the save item;
. Selecting the file type is quite important,
because Macintosh and Unix files have a different "invisible"
end-of-line character, which are mutually incompatible.
The above sequence only enables you to edit your files locally. It does NOT enable you to compile and execute your program (for the simple reason that the Macintosh does not have a licensed Fortran compiler to do the job). To compile and run your program, you will still need to log into the Indigo systems as described above.
If you want to save your work with a different name to the one your
started with, you will need to select Save As instead;
.
If you wanted to create a new file instead,
select first Close and then New from the File menu item.
When saving this new file, you will have to select the Unix File type
and Save As, as before.
When you
finish working in this manner, be sure to drag-n-drop the icon in the wastebasket, otherwise someone
else could come along and delete your files (performing
this action only dismounts the server, it does NOT delete
your files!).
$cvd yourprogname.uxe
A number of overlapping
windows appear. To fully view (and focus the keyboard onto)
any individual window, you will have to click the lhs mouse
button in its area. The main window contains a listing of
your program, which by default it is read only, but you can
make it editable (from the source menu item). You can set
"traps" for your program by clicking in the left hand colum
against a line of code. In the example below, a trap is set
on line 33 of the code. When the code is RUN (from the
menu) it will stop at that point, whereupon the contents of
the other windows will fill with the values of any
variables. An array window (partially obscured below) can
be used to enter an array name (XARRAY in the case below)
and will display the value of the array. The execution view
(partially obscured below) is where you type data for your
program and any output from the program is produced.
The expression window can be used to
evaluate an entire expression to check its numerical
correctness. To do this, the expression needs to be entered
into the appropriate cell of the window. Whilst you can do
this by typing, a less error prone method is to proceed as
follows. In the main window, move the mouse cursor to the
start of the expression you are interested in, and press
the lhs mouse button. Keeping it pressed, move it over to
the end of the expression. The "highlited" text will change
colour. Now click on the first free Expression cell of the
Expression window and press the middle mouse button. The
expression should be "pasted" in. Actually, this combined
operation works anywhere in the workstation environment,
not just here! Finally, a build view enables you to
recompile your program within the environment. It is
invoked when you select recompile from the
source menu item of the main window.
To inspect any data files produced by your program, you can either open them in the editor, or issue the command from the console window;
page horbit.dat
To end paging, type q. Once your calculated data looks reasonable, run the Explorer or Cricketgraph programs.