kent logo

CO538 Anonymous Questions and Answers Keyword Index

This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.

To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.

Keyword reference for course-library


Question 2 (2009):

Submission reference: IN1802

You refer to this out.int method and out.string as being from course.module:

    -- out.int is from "course.module"
    -- out.string is from "course.module"

Where is the documentation for course.module? I need the documentation to be able to output another data type, thanks.

Answer 2:

Both of these, and all the others, are documented in the course library documentation. You can find documentation on all the occam-pi modules here: http://occam-pi.org/occamdoc/ (also linked from the module web-page).

Keywords: course-library


Question 111 (2004):

Is it possible we can actually see the implementation of the PROCs, like: "erase.screen()", "erase.bol()" and others in the utils file ?

Answer 111:

Yes, just look at the source code! See Question 63 (2003) for an indication of where it is.

Keywords: q7 , course-library

Question 35 (2004):

Hi, how do you import a function like `integrate' from another package ? I.e. how do you call `integrate' in `demo_cycles.occ', to be used within Q2 ? Do we copy and paste it in, or can it be called upon ?

Answer 35:

These PROCs are part of `course.lib' and they become available with the line:

    #USE "course.lib"

One way to find out, of course, is just to try and compile something that uses `integrate' -- the compiler will produce an error if it hasn't been defined (either locally of via `#USE' or `#INCLUDE').

Keywords: course-library


Question 63 (2003):

Where can we find the `libsrc' directory? I've had a hunt around raptor and I cant seem to find it anywhere.

Answer 63:

From UNIX, the directory is:


From windows:


Keywords: course-library

Referrers: Question 111 (2004)

Question 54 (2003):

How do we view the `course.lib' file ? I have tried opening in eXceed (with and without gvim). What do we open it with ? Also, what do we use the processes for strings from the `course.lib' file for ? Thank you in advance.

Answer 54:

You can't view the file `course.lib' sensibly. It's a form of Transputer library file (like a Java .jar I guess) -- only useful to the compiler and associated tools.

The source code that makes up this library is readily available, on raptor, in the directory:


In response to your second question, you need the string PROCs and FUNCTIONs in order to manipulate the BYTE arrays -- occam does not have a built-in `STRING' type, so like C, we make do with arrays of BYTEs.

Arrays in occam are generally fixed-size, but the string contained inside them may well be smaller (as is generally the case in q6). The string utilities deal with this nicely, so you don't have to.

For specific information on the string utilities, read the documentation provided in the `string.occ' file (in the directory mentioned above).

The answer to Question 19 (2001) might also be useful.

Keywords: q6 , course-library


Question 39 (2002):

How do I state in occam that I want to use utils.occ? Thanks in advance.

Answer 39:

All your starter files (e.g. q7.occ) already have this set up for you. To answer your question, kroc supports a library mechanism for occam, the details of which are explained in the Linux release (in the essentially-kroc file). The utils.occ material is part of the course library supporting this course. To have access to that library, just put:

  #USE "course.lib"

before you need anything defined in that library (e.g. at the start of your code). Some standard constants (e.g. VAL BYTE FLUSH) are also useful. Currently, VALs, PROTOCOLs, DATA TYPEs (not studied) and CHAN TYPEs (also not studied) cannot be compiled into libraries and have to be included as source code. To get the standard constants needed for some of the course exercises, just put:

  #INCLUDE "consts.inc"

before you need them. Your starter files also have this.

Keywords: course-library

Valid CSS!

Valid XHTML 1.0!

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
Last modified Mon May 20 13:50:26 2013
This document is maintained by Fred Barnes, to whom any comments and corrections should be addressed.