Array editor.

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...

Array editor.

Postby hbarkhof on Wed Jan 08, 2020 5:16 pm

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.
hbarkhof
 
Posts: 42
Joined: Mon Apr 09, 2018 8:37 am

Re: Array editor.

Postby Phil Last on Thu Jan 09, 2020 8:48 am

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: 519
Joined: Thu Jun 18, 2009 6:29 pm

Re: Array editor.

Postby Phil Last on Thu Jan 09, 2020 9:23 am

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.
User avatar
Phil Last
 
Posts: 519
Joined: Thu Jun 18, 2009 6:29 pm

Re: Array editor.

Postby hbarkhof on Thu Jan 09, 2020 11:51 am

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.
hbarkhof
 
Posts: 42
Joined: Mon Apr 09, 2018 8:37 am

Re: Array editor.

Postby Adam|Dyalog on Sun Jan 12, 2020 9:41 am

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'
User avatar
Adam|Dyalog
 
Posts: 68
Joined: Thu Jun 25, 2015 1:13 pm

Re: Array editor.

Postby hbarkhof on Sun Jan 12, 2020 3:31 pm

Aha , okay , thanks Adam. I knew i did wrong !
hbarkhof
 
Posts: 42
Joined: Mon Apr 09, 2018 8:37 am


Return to New to Dyalog?

Who is online

Users browsing this forum: No registered users and 1 guest