SWI-Prolog : "safe" atom_number?
- From: "roschler" <robert.oschler@xxxxxxxxx>
- Date: 4 Oct 2006 08:57:54 -0700
I want to be able to call atom_number/2 in a manner that does not
disrupt program flow if the term being converted is not a number.
Currently, calling atom_number/2 with a non-numeric term generates a
syntax error.
I tried wrapping atom_number/2 in a catch() statement, but the syntax
error is still generated. I want the call to simply fail if I pass a
non-numeric quantity.
How can I do this?
Thanks.
.
- Follow-Ups:
- Re: SWI-Prolog : "safe" atom_number?
- From: student
- Re: SWI-Prolog : "safe" atom_number?
- From: Jan Wielemaker
- Re: SWI-Prolog : "safe" atom_number?
- Prev by Date: Re: Beginner needs help with sicstus I/O
- Next by Date: Re: SWI-Prolog : "safe" atom_number?
- Previous by thread: Beginner needs help with sicstus I/O
- Next by thread: Re: SWI-Prolog : "safe" atom_number?
- Index(es):
Relevant Pages
|
|