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

From: Kish Shen <kisshen_at_...5...>
Date: Wed, 21 Sep 2011 19:34:14 +0100

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)



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.
> _______________________________________________
> ECLiPSe-CLP-Users mailing list

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 : Mon Jul 09 2018 - 02:05:29 CEST