How to use the Macintosh for the Computing Course
First Steps
An animated demonstration illustrating the first few
steps is available as;
Also at this stage, check that no other programs are
running before starting, otherwise you may have insufficient memory
available for the session. You can ascertain this by viewing
"About this Macintosh", from the Apple menu obtained by
clicking anywhere on the "desktop" area.
Back to Top
This has to be done once only
This section assumes you are familiar with very basic operations
on a Macintosh. If you are not, consult the Macintosh documentation,
and familiarise yourself with simple operations, including how to
insert and format a floppy disk.
To start, select from the Apple menu the following sequence;
Chooser
Appleshare
ch.ethertalk2
AUFS Server Neon
and finally hit the OK button.
Type your Indigo account name
and its password;
and click on OK. An icon with your id as its
name will appear on the Mac desktop representing the
Indigo hard disk system, and containing your Indigo files.
The colour of this icon is dark, indicating
it is "selected". Your very next step must be to make an alias
of this item;
Next, insert a floppy disk into the Macintosh (you may have
to initialise it) and copy the alias to the floppy disk.
Back to Top
This has to be done at the start of every session
If your Indigo filebase has not already been mounted as above,
insert the floppy disk with the Indigo alias and double click
it. After prompting for your password, the Indigo files icon
should remount ready for use again.
Double click on
this icon to open the folder and reveal
the contents of your Indigo directory.
. Remember however that Indigo
files have a different end-of-line character to Macintosh files,
and so cannot be automatically interchanged.
Back to Top
Starting the Editor
There are four ways of starting an editor.
- If you have not previously created any programs, click
on first.f
whereupon BBedit should start up to a blank screen.
- If you have a previously created
a file in the Indigo disk area, double clicking will open BBedit directly.
- Invoke BBedit from the Word Processing items of the Apple menu.
- Invoke an editor directly on the Indigo workstations. Click here
for details.
BBedit is quite similar in operation to most word processors.
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. The editor window can 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. To move or delete a portion of text, select it
first with the mouse 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 found using the Search menu.
Back to Top
Saving Your Work
To save your work, select first
the file type;
.
This is important,
because Macintosh and Unix files have a different "invisible"
end-of-line characters, which are mutually incompatible.
Next select the save as item;
.
You must select a file name for
your program ending in .f and also select the Indigo file base
you have previously mounted as your directory.
If you do
not save your files on the Unix file base, you will not be able
to compile them. Double check that you have not mistakenly saved your
file on the Macintosh disk instead.
Backup files will also be created with names such as
first.f (5/11/94)-1. These WILL be stored on the
local hard disk of the Macintosh in the User's folder.
If you suffer a major disaster
during editing, you can always go back to any of the backups. After
you are confident you will not need them, you should delete them
by dragging the icons to the wastebasket.
At regular intervals, you should
save (instead of save as) your file
in order to update the Indigo disk. Only after this has been
done can another Indigo based 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).
Back to Top
Printing Program Listings.
From the file menu, select print. The output should
appear on one of the Deskwriters located in room 170. You
may find a delay of about 30 seconds occurs during the preparation
for printing.
Back to Top
Compiling and Executing
To compile and run your program, you will
need to log into the Indigo systems.
You can do so by clicking for argon,
or neon
or sodium.
You will need again to supply your Indigo account and password in response
to the prompts. In the Indigo window that appears,
type;
ugfor yourprogname
Note that everything should be
typed in lower case! This will assume that you have
previously saved your program with a .f qualifier.
A file called
yourprogname.lis and an executable called yourprogname.uxe
will be produced if there are no errors, and your
program will automatically run and produce a file
containing appropriate values. If compiler errors do occur,
you should inspect the yourprogname.lis file using BBedit
and correct the errors in the original
yourprogname.f file, moving between the two editor windows
to do so. It is most important to note that before you can
re-compile this program, you must save the file
again to disk in the editor, since the editor and compiler
communicate only via the Indigo disk. If you have
previously compiled your program and successfully produced
an executable file, running ugfor again will produce
a prompt asking whether you want to run it again, or
whether you wish to re-compile your program to incorporate
any modifications etc.
Back to Top
The Projects
Both projects will produce additional disk files containing
numerical information that will need to be plotted. Project
A requires plotting using the Indigo Explorer program
and you canot use a Macintosh for this purpose. Project B
requires Cricket Graph III or similar, which can only be done from
a Macintosh. 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.
Back to Top
Finishing Your Session
Before leaving the Macintosh, 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!). Also, exit from the Indigo terminal session
by selecting Quit from the File menu.
Back to Top
Project Requirements.
This would normally involve writing about 100 to 150 lines of
Fortran code. The deadline for submission of completed projects will be
announced during the lectures, but will not be before mid-February. Your final
report should include a program listing and hard copy of any graphical output.
If you have other suggestions for a programming project, check with Dr Rzepa
before starting.
Copyright (c) B. P. Levitt, H. S. Rzepa and ICSTM Chemistry Department, 1994.
Return to Index page