Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors


Manual Reference Pages  - class_add (5)

NAME

class/add - Add class to object or edit buffer

CONTENTS

Synopsis
Description
Error Handling
Examples
See Also
Author

SYNOPSIS

class/add ![object], class <, class ... >
class/add buffer, class <, class ... >

DESCRIPTION

In the first synopsis form, performs a direct edit, assigning class to the specified object.

In the second synopsis form, inserts class add instructions to an object edit buffer. When the buffer is committed against a nexus object using obj/commit, the instructions are processed and the specified list of classes will be assigned to the object.

The object edit buffer identified by the buffer argument will have been previously initialised by obj/def, obj/clone or obj/edit.

One or more class arguments may be provided, and are either text arguments containing the names of the object classes to add, or PSUNIT_TYPE_CLASSDEF registers returned by the class/load instruction.

ERROR HANDLING

A runtime error is generated if an argument is of the wrong type, if the named class does not exist in the schema, or if a referenced object does not exist in the nexus.

EXAMPLES

The following demonstrates the use of an edit buffer for adding multiple classes to a nexus object:

.main  
% Initialise an empty edit buffer
obj/def P0

% Add a list of classes class/add P0, [psContainer], [psErrorType]
% Commit to nexus obj/commit [MyError], P0

SEE ALSO

pal_commands(5), pal_registers(5), pal_indices(5), obj_def(5), obj_clone(5), obj_edit(5), obj_commit(5), class_del(5), class_load(5), ps_classes(5),
PROSE Assembly Language at prose.sourceforge.net.

AUTHOR

Copyright (c) 2002-2016 Mark R. Bannister <cambridge@users.sourceforge.net>.

This is free software and can be downloaded from prose.sourceforge.net; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


PAL 1.0 class_add (5) 29 April 2016
Generated by manServer 1.07 from man5/class_add.5 using man macros.