Version 0 of APLish

Updated 2001-01-17 20:33:13

Richard Suchenwirth - When playing APL in Tcl, I wanted to display the real APL symbols (which are sometimes very special). Hunting the web for transliterations between APL and ASCII, I soon found Jim Weigang's APLASCII [L1 ] which looked good to me: he represents any NON-ASCII characters with braced strings. Here's my initial and incomplete converter - it will grow over time, but if you desperately need it, just grab it now ;-) If called with no arguments aplish performs a little self-test.

A free TrueType font, "SImPL", with APL and many alphabet signs, can be downloaded at [L2 ].

 proc aplish {s {}} {
    if {$s==""} {
        set s "L{<-}(L{iota}':'){drop}L{<-},L @ x{epsilon}y{and}z>0"
    }
    regsub -all {\{\{} $s \x81 s ;# protect double braces
    regsub -all {\}\}} $s \x82 s
    foreach {a u} {
        <-    \u2190
        ->    \u2192
        <=    \u2264
        >=    \u2265
        /=    \u2260
        and   \u22C0
        delta \u0394
        drop  \u2193
        epsilon \u220a
        iota \u03b9
        max  \u2308
        min  \u230A
        neg  \u203e
        or   \u22C1
        rho  \u03C1
        rotate \u233d
        take \u2191
    } {
        regsub -all "\\{$a\\}" $s $u s
    }
    regsub -all @ $s \u235d  s
    regsub -all {\x81} $s \{ s
    regsub -all {\x82} $s \} s
    set s
 }

See The Lish family for more natural language converters.


Arts and crafts of Tcl-Tk programming