bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] 2 questions wrt editing my programs


From: Juergen Sauermann
Subject: Re: [Bug-apl] 2 questions wrt editing my programs
Date: Tue, 22 Apr 2014 18:38:56 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi Peter,

the built-in ∇-editor should almost work like "Editor 1" described in the IBM language reference manual for APL2, chapter 9. When you are scripting GNU APL then you can define functions in your
script like this:

)ERASE AVERAGE
∇Z←AVERAGE B
Z←(+/B)÷⍴B
∇

Having that said, this is how I work:

I use multiple xterm windows (for easy cut-and-paste of APL code).

In the 1. window I edit an APL script using vi (!).

In a second window I start that script when I have edited a function to see if it works.

Since I am an APL newbie, I have a 3rd window with GNU APL running interactively to try out small things. In this window I sometimes edit small functions with the ∇-editor.

Regarding other ways of importing functions, you could write a small function using FILE_IO that reads an entire text file (containing one function) and ⎕FX it. There are lots of other possibilities, e.g.having a makefile instead of window 2 and use ":make from within vi. That saves one window.
The method above works best for me, though.

/// Jürgen


On 04/22/2014 12:33 AM, Peter Teeson wrote:
(1) Where is docn for the built in function editor when running in terminal 
mode?
(I have the IBM manuals - should I be looking there? Also I am not familiar 
with emacs or vi)
(I'm only familiar with the IPSA one)

(2) Can I use an external text editor and interface with quad FX?

Because I now want to get on with my original intent which is to solve a 
problem using APL
rather than C/C++ since APL is much better suited for that purpose - lots of 
arrays involved.

TIA

respect….

Peter





reply via email to

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