Is there a special meaning to underbar variables names in APL

50 views Asked by At

I'm trying to transcribe the FMT function from Formatting APL to Dyalog.

FMT function

However I'm not sure of the meaning of the underbar S and I don't see a mechanism to enter underbar variable names into Dyalog.

So two questions in one: How does one enter underbar variable names into Dyalog and do they have some implied meaning (eg transpose of S)?

2

There are 2 answers

1
Silas On BEST ANSWER

Underscored letters are just standard variables - documentation here- although typically replaced in the font with circled letters.

Whilst I'm not sure how to type them on other platforms, in the terminal you can layer the _ and S together in replace mode - typically toggled to by the Insert key (IN keycode). So type _ then left arrow to move cursor over the '_' and then the letter (S).

⎕FMT can also generate these with {⎕FMT '_',(⎕UCS 8),⍵}'S'

0
LdBeth On

Historically APL\360 was typed using IBM Selectric typewriter, the uppercase letters on the keyboard are replaced with APL symbols and the lowercase letters on the keyboard are printed in uppercase. Then to represent the letters in inverted case an underscore is used.

Note that for the real typewriter it can have multiple letters typed to the same position, so is actually entered by composition of and |, for example, and the order does not matter, the APL session connected to the typewriter console keep track of the letters typed, assuming the APL type ball has been installed to the typewriter.

Since Dyalog runs on PC, it is no longer the case that lowercase letters are missing. So the simple answer is: just replace them by lowercase letters.

In the Unicode version of Dyalog, there is no supported method to type them using Dyalog's APL input method, but these circled alphabet's will be displayed as underscored letters and are still considered as valid charset for identifiers. ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ