Pasting multi-line dfns into the session

For users of dfns, both novice and expert
Post Reply
JohnS|Dyalog

Pasting multi-line dfns into the session

Post by JohnS|Dyalog »

Andy Shiers showed me a cool trick. If you come across a multi-line dfn in an email or in a web page, you can paste it directly into the Dyalog session, if you surround it with ∇ characters.

For example. Copy the following three lines into the clipboard and paste(-unicode) them into the session.

Code: Select all

dup←{
    ⍵ ⍵
}

But before hitting Return, type ∇ characters fore and aft, like so:

Code: Select all

∇dup←{
    ⍵ ⍵
}∇

... and then hit Return to define the function.
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Pasting multi-line dfns into the session

Post by Phil Last »

Easier yet: type the two dels first and paste between them.
Post Reply