Re: type test broken

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

Kat wrote:
> 
> I am feeding a sequence to some code:
> 
data = parse("AbCdEF",{"si",'c'})

 global function parse(sequence s, object c)
 
if sequence(c) then
  str = 0 -- this is executed
 end if

 if atom(c) 
 then 
  --code -- not executed
 else 
   -- code -- not executed
 end if

> 
> So why won't the "if atom(c)... else" code execute?
> 
> Kat
> 
> 

if "AbCdEF",{"si",'c'} is the actual data you are basing this on then
the "if atom(c)" will fail (since {"si",'c'} is a sequence) but it should at
least _do_ the test (let me guess, this is the program you can't trace? :)

My advice, if you're not being paid for it, sleep on it :) 

Gary

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

Search



Quick Links

User menu

Not signed in.

Misc Menu