Re: Why won't this work??!!!

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

> sd2real.ex:30
> character constant is missing a closing '
> if compare(real[1], '1') > -1 and compare(real[1], '31'') < 1 then
>
> this is from the ex.err file. If anyone could tell me why this doesn't work
> and how to fix it I would appreciate it.
>
> Thanks.

the compare() function only does operations on sequences...  marking
off '1' and '31' with single quotations makes them atoms instead of
sequences...  if you used:

if compare(real[1],"1") > -1 and compare(real[1],"31") < 1 then

then it would work...  i don't know if this is really what you want
to do though...  guessing from your code it looks to me like you're
trying to compare atoms, in which case you would use:

if real[1] > 1 and real[1] < 31 then

hope that clears things up y0

 .  .  o o  O O  Mike Burrell  O  O o o  .  .
. o O http://www.geocities.com/SoHo/9036 O o .
 .  o  o  O  mikpos at gaianet.net  O  o  o  .

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

Search



Quick Links

User menu

Not signed in.

Misc Menu