Command: cvt_a

NEST HelpDesk Command Index NEST Quick Reference
Name:
cvt_a - Converts an array to the equivalent type trie.
Synopsis:
/name array cvt_a -> trie
Examples:
/pop [/anytype [-pop-]] cvt_a -> trie
Description:
cvt_a tries to construct a type-trie object from a given array.
The supplied literal is used as name for the trie-object.

WARNING:
Be very careful when using this function. If the supplied
array is not well formed, the interpreter will abort
ungracefully!

Tries should not be constructed fron scratch using cvt_a.
Use the operators trie and addtotrie for this purpose.
Rather, cvt_a is provided to correct minor errors in tries
with the help of cva_t.
Parameters:
The supplied array is the root trie node.
The layout of each trie node must conform to the following
pattern:
[/type [next] [alt]] for non-leaf nodes and
[object] for leaf nodes.

/type is a literal, representing the expected type.
object is any type of token. It is returned when this leaf of
the trie is reached.
[next] is an array, representig the next parameter levels.
[alt] is an array, representig parameter alternatives
at the current level.

This pattern recursively defines a type-trie. Note, however,
that violations of this definition are handled ungracefully.
Bugs:
Errors should be handled gracefully.
Diagnostics:
This operation is low level and does not raise
errors. If the array is ill-formed, the interpreter will
abort!
Remarks:
cvt_a is the inverse function to cva_t.
If cvt_a is applied to the result of cva_t, it yields
the original argument:
/name [array] cvt_a cva_t -> /name [array]
Author:
Marc-Oliver Gewaltig
FirstVersion:
May 20 1999
SeeAlso:
Source:
/var/www/debian/nest/nest-simulator-2.20.0/sli/slitypecheck.cc
NEST HelpDesk Command Index NEST Quick Reference

© 2004 The NEST Initiative