[mercury-users] string__det_to_int

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 15 23:59:20 AEDT 2002


On 15-Nov-2002, Noel  Pinto <cool4life at rediffmail.com> wrote:
> In the string module string__det_to_int is explained as
> :- func string__det_to_int(string) = int.
> Converts a signed base 10 string to an int;
> throws an exception if the string argument does not match the 
> regexp
> [+]?[0-9]+

Actually the regexp in the library documentation is "[+-]?[0-9]+".

This just means "... throws an exception if the string argument does not
consist only of one or more digits, or of one or more digits preceded
by a `+' or `-' sign".

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list