# Command: <<>>

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    <<>> - Create a new dictionary.

Synopsis:

    << /key1 val1 ... /keyn valn >> -> dict

Examples:

      SLI ] << /a 1 /b 2 >> info
      --------------------------------------------------
      Name	 Type	 Value
      --------------------------------------------------
      a	 integertype	 1
      b	 integertype	 2
      --------------------------------------------------
      Total number of entries: 2

      SLI ] << (a) (b) join cvlit 2 3 mul 2 add >> info
      --------------------------------------------------
      Name	 Type	 Value
      --------------------------------------------------
      ab	 integertype	 8
      --------------------------------------------------
      Total number of entries: 1

Description:

    Constructs a dictionary with the entries which are specified
      by key-value pairs.
      Note that the key-value pairs are evaluated BEFORE the dictionary is
      constructed.
      << >> operates the following way:
      The characters << correspond to a mark which is pushed on the stack.
      Next, all following key-value pairs are evaluated.
      >> finally counts the number of pairs on the stack and constructs a
      new dictionary.

Parameters:

    /key	- literal name
      val 	- Object of any type

Diagnostics:

    An ArgumentType error is raised if the
      initializer list does not consist of proper /key value
      pairs.

References:

    The Red Book

SeeAlso:

- clonedict
- begin
- cleardictstack
- dict
- dictstack
- info
- end

Source:

    /opt/conda/conda-bld/nest_1512418852064/work/nest-2.12.0/sli/slidict.cc

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative