Re: Reading a file and converting the input to integers...

From: Kish Shen <>
Date: Tue 19 Oct 2004 12:50:57 PM GMT
Message-Id: <>
Hi Mark,

We got two copies of your message, from different addresses:
and I think they are the same message, or did I miss

>/Domains/ is defined as a list of number strings read in from a file: 

>I thought this would allow me to build up a new list, /NewDomainList/ of 
>integers that I could then use to define the domains of my variables.

The for loop can be written as:

(foreach(StringD, Domains), foreach(D, NewDomainList) do
         number_string(D, StringD)

However, why do you have Domains as a list of strings in the first place? If
you are reading the data from a file as you said, you should be able to read
them in directly as numbers using ECLiPSe's I/O facilities, so that you don't
need to do the conversion at all.


Received on Tue Oct 19 13:52:11 2004

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:31 PM GMT GMT