replacement for quad-CC

Queries and discussions related to migrating from APLX

replacement for quad-CC

Postby shallit on Mon Sep 02, 2019 10:47 am

Looks like quad-CC has disappeared (it used to be in APLX). What's the easiest replacement?
shallit
 
Posts: 13
Joined: Fri Oct 27, 2017 12:25 am

Re: replacement for quad-CC

Postby Morten|Dyalog on Tue Sep 03, 2019 7:28 am

It seems to me that ⎕CC performs a number of quite different functions in APLX, some of which are very specific to the GUI environment. There is no direct equivalent in Dyalog APL, although there are ways to achieve most of what I can see in the APLX reference manual. Can you tell us a little more about what you are trying to do?
User avatar
Morten|Dyalog
 
Posts: 369
Joined: Tue Sep 09, 2008 3:52 pm

Re: replacement for quad-CC

Postby shallit on Wed Sep 04, 2019 1:52 pm

I had been using it to do stuff like the following:

print the letters ABC, then three backspaces, then --- (three minus signs) over what used to be the ABC.

Should I be using ⎕ARBOUT instead?
shallit
 
Posts: 13
Joined: Fri Oct 27, 2017 12:25 am

Re: replacement for quad-CC

Postby Morten|Dyalog on Thu Sep 05, 2019 7:19 am

That does sound like ⎕ARBOUT, yes. Of course, you pretty much need a teletype for that to work, on a screen display the minuses will just overwrite the first letters. There is a feature in Dyalog APL that I consider to be something of an "Easter Egg" - but it can only resolve known overstrikes like underscored letters:

Code: Select all
      chars←⎕FMT 'ABC∆',(4⍴⎕UCS 8),'___|' ⍝ ⎕UCS 8 is backspace
      ⍴chars
1 4
      chars
ⒶⒷⒸ⍋
      ⎕FMT 'ABC',(3⍴⎕UCS 8),'---'
---

If the above displays as circled letters rather than underscores on your screen, that's because you are not using the APL385 Unicode font. Unicode versions of Dyalog APL output underscores as circled letters (because Unicode has no underscored chars) and the font renders them as underscored.
User avatar
Morten|Dyalog
 
Posts: 369
Joined: Tue Sep 09, 2008 3:52 pm

Re: replacement for quad-CC

Postby Veli-Matti on Thu Sep 05, 2019 1:43 pm

Oh, this reminds me of the ancient times with mainframes, where you could do some nice tricks with quad output and backspace (e.g. showing the process information in the session). Not to mention the first time I played with APL on paper terminal, and that was the only way to get the overstrike characters.
Had to test:
      ∆bs←{⎕FMT ⍺,((≢⍺)⍴⎕UCS 8),⍵}

(⎕A,'⊥⊤⎕⎕⎕⎕⎕○○○○*∘~∆∆∇∇∨∧0[/\,∊') ∆bs (⎕A⊢¨'_'),'∘∘''÷:=⋄*|-\¨¨¨_||~~~~]---_'
ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ⍎⍕⍞⌹⍠⌸⋄⍟⌽⊖⍉⍣⍤⍨⍙⍋⍒⍫⍱⍲⍬⌷⌿⍀⍪⍷

Nice! What about..
      '⊂⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕|=<>>∇○⊤⊥⍺⍵⍳;⋄∘○∘' ∆bs '_∘○∧∨↑↓←→/\≠?~/__¨¨¨¨________○'
_∘○∧∨↑↓←→/\≠?~/__¨¨¨¨________○

I was expecting these:
      ⊆⌻⌼⍓⍌⍐⍗⍇⍈⍁⍂⍯⍰⍭≠≤≥⍩⍢⍥⍡⍊⍶⍹⍸⍮⍚⍛⍜⌾


So, Toto, this is not paper terminal any more!

-wm
Veli-Matti
 
Posts: 54
Joined: Sat Nov 28, 2009 3:12 pm

Re: replacement for quad-CC

Postby shallit on Fri Jan 24, 2020 1:21 pm

Unfortunately I still can't get what I want to work. I'd like to output the letters 'abc' on one line of code, with no carriage return, then later output one backspace with no carriage return, then later output 'def' and have it appear finally as 'abdef'.

I just want to output these to the APL window, not a file.

No combination of ⎕ARBOUT, ⎕FMT, or ⍞ seems to work.

Any ideas?
shallit
 
Posts: 13
Joined: Fri Oct 27, 2017 12:25 am

Re: replacement for quad-CC

Postby Phil Last on Sat Jan 25, 2020 9:17 am

I've not tried this myself but you could implement a global trigger so that you merely assign your outputs to a specified name and the trigger function is designed to recognise control characters and know what to do with them, finally displaying the immutable result, presumably ending with carriage return, to the session.
User avatar
Phil Last
 
Posts: 540
Joined: Thu Jun 18, 2009 6:29 pm

Re: replacement for quad-CC

Postby Adam|Dyalog on Sun Jan 26, 2020 7:09 am

Hi shallit,

For that specific behaviour, the following should do:
      ⍞←'abc' ⋄ ⎕DL 1 ⋄ ⍞←⎕UCS 8 ⋄ ⎕DL 1 ⋄ ⍞←'def'

It will display 'abc' then wait a second, then output a backspace (with no visual effect, then change the display to 'abdef'.

If you want the backspace to remove the 'c', use:
      ⍞←'abc' ⋄ ⎕DL 1 ⋄ ⍞←⎕UCS 8 0 8 ⋄ ⎕DL 1 ⋄ ⍞←'def'

It will display 'abc' then wait a second, then change that to 'ab', then wait a second, then change to 'abdef'.
User avatar
Adam|Dyalog
 
Posts: 77
Joined: Thu Jun 25, 2015 1:13 pm

Re: replacement for quad-CC

Postby shallit on Sat Feb 01, 2020 8:30 pm

Unfortunately this suggestion does not work for me. I get no intermediate output at all; it all appears at once and doesn't look like what you said:

∇GO
[1] ⍞←'abc' ⋄ ⎕DL 1 ⋄ ⍞←⎕UCS 8 ⋄ ⎕DL 1 ⋄ ⍞←'def'
[2] ⍞←'abc' ⋄ ⎕DL 1 ⋄ ⍞←⎕UCS 8 0 8 ⋄ ⎕DL 1 ⋄ ⍞←'def'
[3] ∇
GO
abcdefabcdef
shallit
 
Posts: 13
Joined: Fri Oct 27, 2017 12:25 am

Re: replacement for quad-CC

Postby Adam|Dyalog on Sat Feb 01, 2020 10:41 pm

shallit,

What platform (OS and Dyalog interface) are you on?
User avatar
Adam|Dyalog
 
Posts: 77
Joined: Thu Jun 25, 2015 1:13 pm

Next

Return to APLX

Who is online

Users browsing this forum: No registered users and 1 guest