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 101 2 ←→ (1)(2) ←→ 1 (2) ←→ (1) 22'X'3 ←→ 2 'X' 3 ←→ (2) ('X') (3)1 (2+2) ←→ (1) ((2+2)) ←→ ((1)) (2+2)Vector notation may be used to define an item in vector notation:⍴X ← 1 (2 3 4) ('THIS' 'AND' 'THAT')3X[2]2 3 4X[3]THIS AND THATExpressions within parentheses are evaluated to produce an item in the vector:Y ← (2+2) 'IS' 4Y4 IS 4The following identity holds:Structuring of ArraysA B C ←→ (⊂A), (⊂B), ⊂CA class of primitive functions re-structures arrays in some way. Arrays may be inputonly in scalar or vector form. Structural functions may produce arrays with a higherrank. The Structural functions are reshape (⍴), ravel, laminate and catenate (,), reversaland rotation (⌽), transpose (⍉), mix and take (↑), split and drop (↓), and enclose(⊂). These functions are described in Chapter 4.Examples1 23 42 2⍴1 2 3 4ABCDEFGH2 2 4⍴'ABCDEFGHIJKLMNOP'IJKLMNOP↓2 4⍴'COWSHENS'COWS HENS

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

Saved successfully!

Ooh no, something went wrong!