I'll nurse you back to health. I'll wear the nurse outfit!

"BuffyBot" ,'Dirty Girls'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


Jon B. - Nov 19, 2002 3:50:56 pm PST #1634 of 10000
A turkey in every toilet -- only in America!

I tried it, John, and it doesn't seem to catch any errors at all.

I think he only tested for t b t i and t font

t b <> t bold

Jeez I need to go home.


Typo Boy - Nov 19, 2002 4:06:48 pm PST #1635 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

Every test I could come up with worked - except add extra close tags. It liked extra close tags just fine - for example:

< b > < b > gar </b></b></i></i>

Also, this is proof of logic for most things. But you still have to handle the hard cases malformed <A HREF tags and TD and TR commands outside of tables.


John H - Nov 19, 2002 4:09:33 pm PST #1636 of 10000

<bold>

Yes, as Jon said, you have to use actual tags, not ones you've made up yourself!

it takes one closing tag as sufficient for any number of opening tags.

No it doesn't! I mean, no it shouldn't! What were the diagnostics?

It was a bit early when I coded the last bit. I'm happy that it's grabbing the tags and counting them and pushing and popping correctly, but I'm a bit confused about my control structure at the end.

Here's the logic (where A is the push/pop structure, add-a-tag, remove-a-tag in order and B is the Sum Of All Tags, checking that for every open there is a close.):

Result Diagnosis A equals zero, B equals zero Everything is fine. A greater than zero, B equals zero

Bad HTML, but probably not broken.
Tags aren't closed in order, but do all close.

A equals zero, B less than zero Bad HTML, but probably not broken.
All tags close, but extra closing tags found. A greater than zero, B greater than zero Broken.

Can someone translate that into an if/elseif/else for me? My brain's in a slump.


John H - Nov 19, 2002 4:11:52 pm PST #1637 of 10000

except add extra close tags

Ah, I get it. Extra close tags in the case where there was never an opener.

And this is why we have testing.


John H - Nov 19, 2002 4:13:05 pm PST #1638 of 10000

But on the other hand, I was very careful posting that table...


Hil R. - Nov 19, 2002 4:25:46 pm PST #1639 of 10000
Sometimes I think I might just move up to Vermont, open a bookstore or a vegan restaurant. Adam Schlesinger, z''l

Can someone translate that into an if/elseif/else for me? My brain's in a slump.

If b greater than 0, broken.
elseif a greater than or equal to zero{
if a=b, fine
elseif a greater than 0, bad HTML, tags not closed in order
else, bad HTML, extra closing tags
}

I think. There's no a>0, b<0 option. Should there be?


John H - Nov 19, 2002 4:32:25 pm PST #1640 of 10000

There's no a>0, b<0 option.

Good question. That would be "tag opened but not closed in correct sequence, but more closing tags found overall than opening".

That could happen. Oh, oh, as could "a greater than one, b equals zero", which it's currently saying is OK.

Hmmm.

How about if I say I've coded up methods A and B and I just want you smart people to tell me what to do with them?

If I have two methods, with three possible outcomes each, that's actually nine cases, isn't it?


Hil R. - Nov 19, 2002 4:42:27 pm PST #1641 of 10000
Sometimes I think I might just move up to Vermont, open a bookstore or a vegan restaurant. Adam Schlesinger, z''l

If I have two methods, with three possible outcomes each, that's actually nine cases, isn't it?

Yeah, but you're got that b greater than zero is always broken, so that brings it down to six cases (well, seven):

a>0, b=0
a=0, b=0
a<0, b=0
a>0, b<0
a=0, b<0
a<0, b<0


John H - Nov 19, 2002 4:46:30 pm PST #1642 of 10000

OK, this is really what it looks like:

A B Diagnosis 0 0 Everything is fine. 0 >0 Broken 0 <0   <0 0   <0 >0 Broken <0 <0   >0 0   >0 >0 Broken >0 <0  

fill in the blanks for me?


Hil R. - Nov 19, 2002 4:55:59 pm PST #1643 of 10000
Sometimes I think I might just move up to Vermont, open a bookstore or a vegan restaurant. Adam Schlesinger, z''l

First blank: extra closing tags. Probably OK.
Second blank: I think this means tags aren't closed in order. I'm not entirely sure how A works, though, or what a<0 means practically.
Third blank: extra closing tags and tags not closed in order, I think.
Fourth blank: Tags not closed in order, but all close.
Fifth blank: extra closing tags and tags not closed in order.

(I'm not even going to try to put that in a table, because I know I'll break something.)