[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Dec 7 04:18:12 2001 
Subject:Re: List of classes 
From:Aaron Sloman 
Volume-ID:1011207.03 

For some reason your postings to comp.lang.pop are not reaching
Birmingham.

Michael H Lees <mhl@cs.nott.ac.uk++> writes:

> Date: Thu, 06 Dec 2001 17:04:31 +0000
> Organization: ACS, The University of Nottingham
>
> Hi,
>
> I'm trying to make a list of classes?

What sorts of classes are you talking about?

There are the basic Pop-11 classes described in
    HELP CLASSES

and in
    REF keys

And there are also the classes defined by LIB Objectclass, described
in
    HELP objectclass

The former do not include subclasses and inheritance. The lattter
do.

> If I make an instance of a class
> say x how do I add it to a list?

Do you want to add the instance to the list or the class to the
list?


> Thanks
>
> Mike  mhl@cs.nott.ac.uk

If you are talking about the first sort of class, each class is
represented by a key, e.g. pair_key, device_key, string_key,
word_key, procedure_key, etc.

You can put keys in lists, just as you put anything else in lists.

Keys are pop-11 data-structures (records). Their class is the key
class, and there is a key for that class, namely key_key

If you are referring to the classes defined by the objectclass
package, they are also represented by keys. I.e. defining a class
of type X

    define :class X;
        ....
    enddefine;

will create a new key referred to as X_key, as explained in
REF objectclass and HELP objectclass.

See also chapter 9 of the pop-11 primer (TEACH primer).

I hope that helps.

I suspect I have not understood your high level objectives. for that
a more detailed example of what you are trying to do would
be necessary.

Aaron