

On Wed, 16 Oct 2002 Fergus Henderson wrote :
>On 16-Oct-2002, Noel  Pinto <cool4life@rediffmail.com> wrote:
> > In the following piece of code, I can understand how to use
> > 'throw' from the file 'exception'.
> >
> > read_int(Int) -->
> >         io__read_line_as_string(Result),
> >         {       Result = ok(Line),
> >                 remove_suffix(Line, "\n", IntString),
> >                 string__to_int(IntString, IntVal)
> >                 ->
> >                 Int = IntVal
> >         ;
> >                 throw("invalid entry, end-of-file, or I/O
> > error")
> >         }.
> >
> >  I would like to know various other pred, mode and inst 
>mentioned
> > in the file 'exception'. I mean, I want to know how to use it. 
>Plz
> > do show a small piece of code for each.
>
>There are some example uses of most of the exception handling 
>routines
>in the files in the directory hard_coded/exceptions in the 
>Mercury test
>suite (the mercury-tests distribution).

There are two types of files, I mean they have '.m' and '.exp' 
extensions. When I compile '.m' files with or without '.exp' files 
in the same folder, the output is the same. What is the use of 
'.exp' files??

>There are some example uses of try_io in the sources for the 
>Mercury compiler.
>Just grep for it.
>
>That is, use the Unix (and cygwin) command `grep', e.g.
> 	grep -n try_io compiler/*.m
This command does not work for me. It gives me the following 
error...
grep: compiler/*.m: No such file or directory

Thanks,

Noel
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users@cs.mu.oz.au
administrative address: owner-mercury-users@cs.mu.oz.au
unsubscribe: Address: mercury-users-request@cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request@cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------

