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

From: <wh_at_icparc.ic.ac.uk>
Date: Tue 19 Oct 2004 12:57:12 PM GMT
Message-ID: <20041019125712.GB11759@tempest.icparc.ic.ac.uk>
Hi Mark,

On Tue, Oct 19, 2004 at 01:23:20PM +0100, Mark A. Hennessy wrote:
> /Domains/ is defined as a list of number strings read in from a file: 
> ["1","2","3","4","5","6","7"...]
> 
> (foreach(Domain,Domains),
> foreach(D,NewDomainList) do
>    number_string(NewDomain,D)
> )

Do you not get compiler warnings for the above code along the lines of:

*** Warning: Singleton local variable NewDomain in do-loop, maybe param(NewDomain) missing?
        before line xx in file xxxx
*** Warning: Singleton local variable Domain in do-loop, maybe param(Domain) missing?
	before line xx in file xxxx

Does this help you figure out what the problem/s is/are?

> 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. It 
> does not work ...

When reporting problems, it is usually helpful to provide more information
about what is going on than "it does not work".  In future please specify in
what way does it does not work: does it fail unexpectedly, give the wrong
answer(s), result in a segmentation violation, fail to terminate, etc.?

Thanks,
Warwick
Received on Tue Oct 19 13:58:07 2004

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