bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] HTML∆Assert Value Error


From: Juergen Sauermann
Subject: Re: [Bug-apl] HTML∆Assert Value Error
Date: Fri, 22 May 2015 15:43:45 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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, address@hidden 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

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