Re: [eclipse-clp-users] Read integer from user (without a dot)

From: Kish Shen <kisshen_at_cisco.com>
Date: Wed, 21 Sep 2011 19:34:14 +0100
Hi,

If you use ECLiPSe's help/1 with the query "help read.", this would give 
you a list of all builtins whose name has read in it (a predicate that 
provides the functionality you want is likely to have read as part of 
its name), including

read_token/2 and read_token/3, which is probably what you want - call it 
with Class set to integer:

read_token(stream, X, integer)

Cheers,

Kish


On 21/09/2011 18:22, Sergey Dymchenko wrote:
> Sorry for probably stupid question, but I can't find an answer.
>
> How to read an integer from user?
> read(N) requires user to end input with dot,
> read_line(N) returns a string, not an integer...
>
> Sergey.
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users


-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Wed Sep 21 2011 - 18:34:22 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET