bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Correct Syntax for HTML∆xbox ?


From: Juergen Sauermann
Subject: Re: [Bug-apl] Correct Syntax for HTML∆xbox ?
Date: Wed, 14 Oct 2015 13:22:42 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Alex,

in the HTML context, a box is a vector of (enclosed) lines. It is not
a classical 2-dimensional APL value. This is because a vector of enclosed lines
is more appropriate than a 2-dimensional matrix when the line-lengths differ
considerably (like in HTML).

So you may want to try this:

      )COPY 5 HTML

      ⎕←⊃  A←'A1' 'A2' 'A3'   ⍝ "Matrix" with 3 rows and 2 columns
A1
A2
A3

      ⎕←⊃  B←'BB1' 'BB2'
    ⍝ "Matrix" with 2 rows and 3 columns
BB1

BB2

      ⎕←⊃   A HTML∆xbox B

A1BB1
A2BB2
A3  


/// Jürgen


On 10/14/2015 01:01 AM, address@hidden wrote:
Hi Bug-APL,
I'm a bit confused. The synopsis states "append text matrices A and B horizontally". The example near the function definition uses slightly different phrasing, and provides an example that does not use exactly "HTML∆xbox":

⍝ append boxes A and B horizontally:
⍝ AABBB   AA      BBB
⍝ AABBB ← AA xbox BBB
⍝ AA      AA

When I tried what I thought was the correct usage, I get an error (see below). Can someone demonstrate how to use this function? 

      )COPY /usr/local/lib/apl/wslib5/HTML.apl
      A←3 2 ⍴'A'
      B←2 3 ⍴'B'
      
      A HTML∆xbox B
 
<pre>************************************************
 
*** Assertion (sert 2 ≡ ≡yA) failed at HTML∆xbox[1]

</pre>
≡  yA: 1  ┏→━┓
⍴⍴ yA: 2  ↓AA┃
⍴  yA: 3 2┃AA┃
          ┃AA┃
          ┗━━┛
</pre>
<pre>
 
Stack:
◊[0]        
HTML∆xbox[1]
 
************************************************</pre>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]