[CS3304_1381] Converting digits to numbers

New Message Reply About this list Date view Thread view Subject view Author view

Stephen Edwards (edwards@CS.VT.EDU)
Thu, 20 Apr 2000 09:10:03 -0400


Message-ID:  <38FF01AB.2A81B920@cs.vt.edu>
Date:         Thu, 20 Apr 2000 09:10:03 -0400
From: Stephen Edwards <edwards@CS.VT.EDU>
Subject:      [CS3304_1381] Converting digits to numbers

Julia Lee wrote:
>
> Is there a function in Prolog that converts digits
> into integers or do we have to implement that
> ourselves?

Yes, there is. It is a predicate called "number_chars". Look it
up in the SWI documentation. You can also see an example of its
use in the expr_tokenizer.pro sample on the prolog page of the
class web site.

                                -- Steve

--
Stephen Edwards            641 McBryde Hall          Dept. of Computer Science
e-mail      : edwards@cs.vt.edu           U.S. mail: Virginia Tech (VPI&SU)
office phone: (540)-231-5723                         Blacksburg, VA  24061-0106
-------------------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Thu Apr 20 2000 - 09:11:44 EDT