RE: boolean error?
- Posted by rforno at tutopia.com Aug 05, 2002
- 396 views
----- Original Message ----- From: Kat <gertie at PELL.NET> Subject: RE: boolean error? > > On 5 Aug 2002, at 9:20, Matthew Lewis wrote: > > > > > > -----Original Message----- > > > From: Kat [mailto:gertie at PELL.NET] > > > > > This has me puzzled, i see no reason in this: > > > > > > >From ex.err: > > > n = {0} > > > > > > so why doesn't this line execute? > > > if equal(n,"0") or equal(n,0) then > > > > Because they're not equal. Your line is equivalent to: > > > > if equal(n,{48}) or equal(n,0) then > > Yes, so? n = {0}, meaning {48}, no? > No. n = {'0'} means {48}, because '0' is 48, and "0" is also {48}. {0} is, of course, {0}. {"0"} is {{48}}. > > Perhaps change it to: > > > > if equal(n,"0") or equal(n,0) or equal(n,{0}) then > > > > or... > > > > if find(n, { "0", 0, {0} } ) then > > I did all those, but settled on: > > if sequence(n) and (length(n) =1) then > n= n[1] -- convert to atom > end if > if equal(n,0) then > > Kat > > > >