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


Manual Reference Pages  - obj_child (5)

NAME

obj/child - Reference a child object

CONTENTS

Synopsis
Description
Error Handling
Examples
See Also
Author

SYNOPSIS

obj/child write, ![object], [name]
obj/child write, [name]

DESCRIPTION

Returns in the write register a pointer to the child node called name located underneath the given object. If no object argument is provided, returns a pointer to the child located underneath the context root (PCTX).

This instruction is similar to obj/addr except that it takes only a single node name and not a path. This is convenient for referencing objects that contain dots in their name, as the dots will not need protecting with backslashes when referenced by obj/child.

ERROR HANDLING

A runtime error is generated if an argument is the wrong type, or if the referenced object does not exist.

EXAMPLES

obj/child P0, ![.prose.code], [default]
  Returns a pointer to the .prose.code.default node, which is the child of .prose.code and stores the result in register P0.
obj/child PUSH, [test.object]
  Looks up the child node called ’test.object’ underneath PCTX and pushes the result onto the stack.

SEE ALSO

pal_commands(5), pal_registers(5), pal_indices(5), obj_addr(5), obj_pa(5), reg_load(5),
PROSE Assembly Language at prose.sourceforge.net.

AUTHOR

Copyright (c) 2002-2009 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 obj_child (5) 28 September 2009
Generated by manServer 1.07 from man5/obj_child.5 using man macros.