14

SUN/150.10

Starlink Project
Starlink User Note 150.10

D.S. Berry

20th October 2012


GRP
Routines for Managing Groups of Objects

Version 3.7

Programmer’s Manual



Abstract

GRP provides facilities for handling groups of objects which can be described by character strings (e.g. file names, astronomical objects, numerical values, etc). Facilities are provided for storing and retrieving such character strings within groups, and for passing groups of character strings between applications by means of a text file. It also allows the creation of groups in which each element is a modified version of an element in another group.

Contents

1 Introduction
 1.1 Facilities Provided by GRP
 1.2 An Example of a Simple GRP Application
  1.2.1 Example Code
  1.2.2 Examples of Possible User Responses
2 Names
 2.1 Case Sensitivity
3 Groups and Group Identifiers
4 Group Expressions
 4.1 Elements and Delimiters
 4.2 Editing of Names
 4.3 Indirection Elements
 4.4 Modification Elements
 4.5 Nesting Within Group Expressions
 4.6 Flagging a Group Expression
 4.7 Comments Within Group Expressions
 4.8 Escaping the Special Characters in a Group Expression
 4.9 The Order of Names Within a Group
5 Using GRP Routines
 5.1 Symbolic Constants and Status Values
 5.2 Creating and Deleting Groups
 5.3 Storing Names in a Group
 5.4 Retreiving Names from a Group
 5.5 Retrieving Attributes of Names
 5.6 Deleting Names
 5.7 Changing the Characters Used to Control the Syntax of Group Expressions
  5.7.1 Suppressing the Use of Selected Control Characters
 5.8 Creating Associations Between Groups
6 Compiling and Linking
A Alphabetical List of Routines
B Classified List of Routines
 B.1 Creating and Deleting Groups
 B.2 Enquiring Group Attributes
 B.3 Setting Group Attributes
 B.4 Enquiring Name Attributes
 B.5 Retreiving Names
 B.6 Storing Names
 B.7 Deleting Names
 B.8 Creation and Control of Identifiers
 B.9 ADAM Parameter System Routines
 B.10 Debugging Routines
C Routine Descriptions
GRP_ALARM – Notify the user of an event in the life of a watched group
GRP_COPY – Copy a section of an existing group to a new group
GRP_DELET – Delete a group from the GRP system
GRP_GET – Returns a set of names contained in a group
GRP_GETCC – Returns requested control characters for the specified group
GRP_GETCS – Determine the case sensitivity of a group
GRP_GROUP – Append a list of names obtained from the environment to a previously created group
GRP_GRPEX – Append a list of names contained within a supplied group expression to a previously created group
GRP_GRPSZ – Returns the number of names in a group
GRP_GTYPE – Retrieve the type string stored with a group
GRP_HEAD – Finds the group which is at the head of an owner-slave chain
GRP_INDEX – Searches for a given name and if found, returns its index
GRP_INFOC – Retrieve an item of character information about a name
GRP_INFOI – Retrieve an item of integer information about a name
GRP_LIST – Write names to a text file specified by the environment
GRP_LISTF – Write names to a specified text file
GRP_MSG – Assign an element of a group to a message token
GRP_NEW – Create a new empty group
GRP_OWN – Returns the identifier of the group which owns the specified group
GRP_PTYPE – Associate a new type string with a group
GRP_PURGE – Purge duplicate entries from a group
GRP_PUT – Put a given set of literal names into a group
GRP_PUT1 – Put a single name into a group
GRP_REMOV – Remove all occurrences of a given name from a group
GRP_SAME – Determine if two GRP identifiers refer to the same group
GRP_SETCC – Sets requested control characters for the specified group
GRP_SETCS – Establish the case sensitivity of a group
GRP_SETSZ – Reduce the size of a group
GRP_SHOW – List contents ofa group to the screen
GRP_SLAVE – Returns the identifier of the group which is owned by the specified group
GRP_SOWN – Establish one group as the owner of another group
GRP_VALID – Determine if a group identifier is valid
GRP_WATCH – Watch for events in the life of a specified group

D GRP Error Status Values
E Packages Called From Within GRP
F Acknowledgements
G Changes and New Features in V3.7
H Changes and New Features in V3.6
I Changes and New Features in V3.5
J Changes and New Features in V3.4
K Changes and New Features in V3.3
L Changes and New Features in V3.2
M Changes and New Features in V3.1
N Changes and New Features in V3.0
O Changes and New Features in V2.0
P Changes and New Features in V1.1