Command: put

NEST HelpDesk Command Index NEST Quick Reference

Name:
 put - put indexed object into container
Synopsis:
 
           array/proc int any         --> array/proc
           array  array any           --> array
           string/array/proc int int  --> string/array/proc
           litproc int any            --> litproc
           dict literal any           --> -
Description:
   put will call appropriate typedepending put operator. The indexed
   object of the container will be replaced by the new one.

   Alternatives: Functions put_a for arrays, put_p for procedures,
   put_lp for literal procedures, put_s for strings (all undocumented)
   and put_d for dictionaries (SeeAlso) 
   -> behaviour and synopsis are the same. 


Parameters:
 
    First parameter is the container,
    Second the index,
    third the object to put.
    The modified container is returned.
Examples:
 
   (Hello Wxrld!)      7 111    put --> (Hello World!)
   [(Hello) 1 /a 12]   2 /here  put --> [Hello 1 here 12]
   [[1 2][3 4]]    [1 1] 6      put --> [[1 2] [3 6]]
   {(Hello World!) ==} (Bye!) 1 put --> {(Bye!) ==}
   systemdict          /MyLit 5 put --> -  % MyLit equals integer 5 now!    
 
Author:
 Gewaltig, Diesmann
FirstVersion:
 ??
Remarks:
 Commented Hehl April 21, 1999
 
SeeAlso:get put_d
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/lib/sli/sli-init.sli

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative