Pasting multi-line dfns into the session
2 posts
• Page 1 of 1
Pasting multi-line dfns into the session
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.
But before hitting Return, type ∇ characters fore and aft, like so:
... and then hit Return to define the function.
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.
- JohnS|Dyalog
Re: Pasting multi-line dfns into the session
Easier yet: type the two dels first and paste between them.
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
2 posts
• Page 1 of 1
Return to Functional Programming
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group