Array editor.

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...
Post Reply
hbarkhof
Posts: 44
Joined: Mon Apr 09, 2018 8:37 am

Array editor.

Post by hbarkhof »

Would like to try the array editor written by David Liebtag but can't find how to call or use it. I do see a "aedit.dyalog"
But have no idea how to use it. Probably some simple instructions would do the job ?

Henk.
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Array editor.

Post by Phil Last »

If name is the name of an accessible variable array:

Place cursor on the name.
Click [Array Editor] toolbutton.

or

      ]Array.Edit name
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Array editor.

Post by Phil Last »

Alternatively, in Dyalog ≥ 17.1 you could try
      ed←{⎕SE.Link.(Deserialise array⊣⎕ED'array'⊣array←Serialise ⍵)}
name←ed name

You'll be presented with a modal Dyalog editor window in which your array is presented in Dyalog's version of array notation as a text matrix. This is fairly self explanatory but the three main things to understand are:
  • character data are quoted while numerics are not
  • within parentheses unquoted linebreaks or diamonds start new items of a nested vector
  • within brackets unquoted linebreaks or diamonds start new cells of a multi-dimensional array

Users of Carlisle Group's Acre project management system already have access to
      ]acre.EditArray name
which follows the same protocol using APLAN in which presentation differs trivially from Dyalog's version.
hbarkhof
Posts: 44
Joined: Mon Apr 09, 2018 8:37 am

Re: Array editor.

Post by hbarkhof »

Thank you Phil. First tip works great.
I use 17.1 but your second tip does not work for me.
got :
name←ed name
VALUE ERROR: Undefined name: name
name←ed name
Very probably my fault. Anyway the array editor works. Thanks again.

Henk.
User avatar
Adam|Dyalog
Posts: 143
Joined: Thu Jun 25, 2015 1:13 pm

Re: Array editor.

Post by Adam|Dyalog »

Substitute "name" with the name of your variable.

Maybe an easier to use version is:
      ed←{⍎⍵,'←⎕SE.Link.Deserialise ',⍵⊣⎕ED⍵⊣⍎⍵,'←⎕SE.Link.Serialise ',⍵}
myvar←⍳2 2 3
ed 'myvar'
hbarkhof
Posts: 44
Joined: Mon Apr 09, 2018 8:37 am

Re: Array editor.

Post by hbarkhof »

Aha , okay , thanks Adam. I knew i did wrong !
Post Reply