[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

DCL and symbol arrays?

» close window

The Question is:

 
How do I create an "array" in DCL?
 
Years ago I remember that I was able to simulate an array using string
variables somehow.
 
Any ideas?
 
Ken
 


The Answer is :

 
  Among other omissions, DCL does not have a native array construct.
 
  You can use symbol substitution to add an index into a symbol name,
  and can thus treat a set of separate DCL symbols as an array.
 
    $ index = 1
    $ foo_'index = 42
 
  Various books and manuals (covering DCL in detail) are available.
 

answer written or last revised on ( 26-APR-1999 )

» close window