bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] assigning a scalar to several index in a matrix


From: Blake McBride
Subject: Re: [Bug-apl] assigning a scalar to several index in a matrix
Date: Mon, 9 Mar 2015 21:13:36 -0500

If ⎕IO is 0, you index from 0 to it's size-1.  If ⍴ is 13 you index with 0-12

On Mon, Mar 9, 2015 at 9:03 PM, Blake McBride <address@hidden> wrote:
We need to see ⎕IO

Speaking for myself only, trivial questions are very welcome!

Blake


Blake McBride

www.arahant.com
Cell:  615-394-6760




On Mon, Mar 9, 2015 at 8:55 PM, Christian Robert <address@hidden> wrote:
I do not understand why assigning a scalar to several index in a matrix fail

Xtian.

ps: there should be a gnuapl users group somewhere where I can ask trivial questions like this one
    if not, someone should create one.



     ]boxing 8
      a
┌→─────────────────────┐
↓                      │
│ 5 3 0   0 7 0  0 0 0 │
│ 6 0 0   1 9 5  0 0 0 │
│ 0 9 8   0 0 0  0 6 0 │
│                      │
│ 8 0 0   0 6 0  0 0 3 │
│ 4 0 0   8 0 3  0 0 1 │
│ 7 0 0   0 2 0  0 0 6 │
│                      │
│ 0 6 0   0 0 0  2 8 0 │
│ 0 0 0   4 1 9  0 0 5 │
│ 0 0 0   0 8 0  0 7 9 │
│                      │
└──────────────────────┘
      ⍴a
┌→────┐
│13 22│
└─────┘
      a[1;]←'x'
      a[1;]←' '
      a[1 5 9 13;]←'─'
INDEX ERROR
      a[1 5 9 13;]←'─'
      ^           ^
      ⍴a
┌→────┐
│13 22│
└─────┘
      I do not understand why assigning a scalar to several index in a matrix fail





reply via email to

[Prev in Thread] Current Thread [Next in Thread]