Hi Christian,
Unfortunately, the code seems to not care about this fact as a single empty vector is still problematic. It has no troubles with two empty vectors though:
button←'BUTTON' HTML∆TX_B_E[⊃,/b∆attr1 b∆attr2 b∆attr3] ""
<pre>************************************************
*** Assertion (sert 2 ≡ ≡yB) failed at HTML∆TX_B_E[4]
</pre>
≡ yB: 1┏⊖┓
⍴⍴ yB: 1┃ ┃
⍴ yB: 0┗━┛
</pre>
<pre>
Stack:
◊[0]
◊[0]
◊[0]
◊[0]
◊[0]
HTML∆TX_B_E[4]
************************************************</pre>
button←'BUTTON' HTML∆TX_B_E[⊃,/b∆attr1 b∆attr2 b∆attr3] "" ""
button
<BUTTON name="submitButton" type="submit" value="SUBMIT!"> </BUTTON>
-------- Original Message --------
Subject: Re: [Bug-apl] How do you use HTML∆TX_B_E
From: Christian Robert <christian.rob...@polymtl.ca>
Date: Wed, June 10, 2015 5:24 pm
To: alexwei...@alexweiner.com
Cc: "bug-apl@gnu.org" <bug-apl@gnu.org>
From what I understood,
this is a scalar '' (an empty one)
this is a vector "" (an empty one)
'something' is equivalent to "something" as long as length of something >= 2
'a' <> "a" because 'a' is a scalar and "a" is an array of length 1
'' <> "" because '' is an empty scalar and "" is an empty array.
So, use the double quotes rather than the single quote for most things will save you
lot of problems, especially where the program expect a string as left or right argument.
I may be wrong.
Christian Robert.
On 2015-06-10 19:27, alexwei...@alexweiner.com wrote:
> Hi bug-apl,
>
> Im not even sure if I am using it right but it seems that HTML∆TX_B_E wants a nested vector as it's right argument. This works:
> b∆attr1←'name'HTML∆attr'submitButton'
> b∆attr2←'type'HTML∆attr'submit'
> b∆attr3←'value'HTML∆attr'SUBMIT!'
>
> ⊃,/'BUTTON' HTML∆TX_B_E[⊃,/b∆attr1 b∆attr2 b∆attr3] '' ''
> ┌→──────────────────────────────────────────────────────────────────────┐
> │<BUTTON name="submitButton" type="submit" value="SUBMIT!"> </BUTTON>│
> └───────────────────────────────────────────────────────────────────────┘
>
> but only supplying one string, causes that nasty HTML stack thing to print out (and I'm not too sure how to understand it). Is this on purpose, and maybe i'm using it entirely wrong?
>
> ⊃,/'BUTTON' HTML∆TX_B_E[⊃,/b∆attr1 b∆attr2 b∆attr3] ''
> ┌─┐
> │ │
> └─┘
> ┌→────────────────────────────────────────────────────┐
> │<pre>************************************************│
> └─────────────────────────────────────────────────────┘
> ┌─┐
> │ │
> └─┘
> ┌→────────────────────────────────────────────────────┐
> │*** Assertion (sert 2 ≡ ≡yB) failed at HTML∆TX_B_E[4]│
> └─────────────────────────────────────────────────────┘
> ┌⊖┐
> │ │
> └─┘
> ┌→─────┐
> │</pre>│
> └──────┘
> ┌→──────────┐
> ↓≡ yB: 1┏⊖┓│
> │⍴⍴ yB: 1┃ ┃│
> │⍴ yB: 0┗━┛│
> └───────────┘
> ┌→─────┐
> │</pre>│
> └──────┘
> ┌⊖┐
> ⌽ │
> └─┘
> ┌→────┐
> │<pre>│
> └─────┘
> ┌─┐
> │ │
> └─┘
> ┌→─────┐
> │Stack:│
> └──────┘
> ┌→─────────────┐
> ↓◊[0] │
> │◊[0] │
> │◊[0] │
> │◊[0] │
> │◊[0] │
> │◊[0] │
> │HTML∆TX_B_E[4]│
> └──────────────┘
> ┌─┐
> │ │
> └─┘
> ┌→─────────────────────────────────────────────────────┐
> │************************************************</pre>│
> └──────────────────────────────────────────────────────┘
>