Hi Alse,

as the file says:

      ⍝ Variable name conventions:
      ⍝
      ⍝ Variables starting with x, e.g. xB, are strings (simple vectors of
      ⍝ characters), i.e. 1≡ ≡xB and 1≡''⍴⍴⍴xB

The fact that 'A' is a scalar while 'ABC' is a vector in APL is a frequent source of trouble.
For that reason, GNU APL has double qoutes that avoid this pitfall; "A" and "ABC" are both
character vectors and I would use them for attribute names in HTML.

/// Jürgen


On 05/22/2015 04:03 AM, [email protected] wrote:
Hi bug-apl,

Is there any reason HTML∆attr does not like single characters? I would assume that 

'left' HTML∆attr 'a '

would return

left="a"

Instead it prints:

<pre>************************************************

*** Assertion (sert 1 ≡ ≡xB) failed at HTML∆attr[2]

</pre>
≡ xB: 0┏━┓
⍴⍴ xB: 0┃a┃
⍴ xB: ┗━┛
</pre>
<pre>

Stack:
◊[0]
HTML∆attr[2]

************************************************</pre>

 

adding one extra space seems acceptable:

'left' HTML∆attr 'a '
left="a "

 

(SVN revision 630)

-Alex Weiner


Reply via email to