|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Gnu APL and ANSI escape sequences |
Date: | Mon, 17 Feb 2014 15:00:52 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi Fred,
I believe you simply need to create the sequence and insert it into the other text as appropriate, eg: ESCSEQ←(⎕UCS 27),'[0;35;48m' ⍝ RED foreground 'Hello',ESCSEQ,'World' HelloWorld Note that ⎕UCS is more portable than ⎕AV or ⎕AF. /// Jürgen On 02/14/2014 10:04 PM, Frederick H. Pitts wrote: Gentle people, Is there a way for a Gnu APL program to send ANSI escape sequences to the terminal in which the iterpreter is running? If not, I wish to propose the following: The ⍞ handling be extended by implementing an alternative mode where only the content of the last assign to ⍞ be retained in quote-quad-prompt instead of appending the content of all consecutive assigns up to the point ⍞ is referenced. In the alternative mode quote-quad-prompt should be emptied when ⍞ is referenced, just like it is currently. The alternative mode could be activated by setting a boolean control flag (e.g., ⎕QQ ← 1 or maybe adding another element to ⎕FC). As the ⍞ handling currently works, assigning a ANSI escape sequence to ⍞ produces the desired result on the screen, but as soon as one references ⍞ (even after assigning a character vector not containing escape sequences) garbage appears in the user's response. Please find attached ANSI_TEST.apl.gz. The file demonstrates the above issue. If there is a way for Gnu APL to send escape sequences to its terminal, please let me know and I apologize for wasting your time. Regards Fred Retired Chemical Engineer |
[Prev in Thread] | Current Thread | [Next in Thread] |