Re: type test broken

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 11 Jul 2005, at 9:49, Matt Lewis wrote:

> 
> 
> posted by: Matt Lewis <matthewwalkerlewis at gmail.com>
> 
> Kat wrote:
> > 
> > If you watch the variable contents in the trace window, str should have been
> > set to 1 in the ..else.. code (see below where i added it). It isn't. Ergo,
> > it
> > isn't executing. I'll paste the entire parse code to this email (below), and
> > the code which calls parse() again.
> 
> <snip>
> 
> }}}
<eucode>
>    else while equal(c[1],"k") or equal(c[1],"i") or equal(c[1],"s")do
> 
> data = parse("AbCdEF",{"si",'c'})
> </eucode>
{{{

> 
> Here's the problem.  You've either constructed 'c' incorrectly, or your
> tests are incorrect, because c[1] = "si".  Perhaps it should be:
> }}}
<eucode>
>    else while equal(c[1],"k") or match("i",c[1]) or match("s",c[1]) do
> </eucode>
{{{

> 
> If you move the start of the while loop off of the same line as the else, 
> you can see that it does go into the else block, but the while tests fail.

Yes, i noticed that this morning too. It's another case of compounding the 
error before submitting the question here. I'm sorry.

Kat
looking sheepish.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu