Re: atom_number/2: Type error
Steve Moyle <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Carlo is indeed correct -- or at least his fix works. I just find a touch of irony in finding it hard to determine the underlying type of an untyped language :-) (none the wiser, but moving forward) > > Hi Steve > are you sure it's not already a number ? Still not sure :-) > Guard the conversion with a test before: > > ( atom(A) -> atom_number(A,N) ; N = A ), Thanks -- this works.