12.07.2015 Views

Programmer's Guide & Language Reference - Dyalog Limited

Programmer's Guide & Language Reference - Dyalog Limited

Programmer's Guide & Language Reference - Dyalog Limited

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 1: Introduction 36Namespace <strong>Reference</strong>sA namespace reference, or ref for short, is a unique data type that is distinct from andin addition to number and character.Any expression may result in a ref, but the simplest one is the namespace itself:)NS NS1NS1.A←1NS1.B←2 3⍴⍳6⍝ Make a namespace called NS1⍝ and populate it with variables A⍝ and B#.NS1NS1You may assign a ref; for example:#.NS1X←NS1X⍝ expression results in a refIn this case, the display of X informs you that X refers to the named namespace#.NS1.You may also supply a ref as an argument to a defined or dynamic function:∇ FOO ARG[1] ARG∇#.NS1FOO NS1The name class of a ref is 9.9⎕NC 'X'You may use a ref to a namespace anywhere that you would use the namespace itself.For example:11 2 34 5 6X.AX.B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!