replacement for quad-CC
12 posts
• Page 1 of 2 • 1, 2
replacement for quad-CC
Looks like quad-CC has disappeared (it used to be in APLX). What's the easiest replacement?
- shallit
- Posts: 14
- Joined: Fri Oct 27, 2017 12:25 am
Re: replacement for quad-CC
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?
-
Morten|Dyalog - Posts: 460
- Joined: Tue Sep 09, 2008 3:52 pm
Re: replacement for quad-CC
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?
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: 14
- Joined: Fri Oct 27, 2017 12:25 am
Re: replacement for quad-CC
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:
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.
- 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.
-
Morten|Dyalog - Posts: 460
- Joined: Tue Sep 09, 2008 3:52 pm
Re: replacement for quad-CC
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:
Nice! What about..
I was expecting these:
So, Toto, this is not paper terminal any more!
-wm
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: 94
- Joined: Sat Nov 28, 2009 3:12 pm
Re: replacement for quad-CC
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?
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: 14
- Joined: Fri Oct 27, 2017 12:25 am
Re: replacement for quad-CC
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.
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
Re: replacement for quad-CC
Hi shallit,
For that specific behaviour, the following should do:
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:
It will display 'abc' then wait a second, then change that to 'ab', then wait a second, then change to 'abdef'.
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'.
-
Adam|Dyalog - Posts: 143
- Joined: Thu Jun 25, 2015 1:13 pm
Re: replacement for quad-CC
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
∇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: 14
- Joined: Fri Oct 27, 2017 12:25 am
Re: replacement for quad-CC
shallit,
What platform (OS and Dyalog interface) are you on?
What platform (OS and Dyalog interface) are you on?
-
Adam|Dyalog - Posts: 143
- Joined: Thu Jun 25, 2015 1:13 pm
12 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group