Hi,

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]+


What I understand is regexp is a regular expression with wild card 
patterns and symbols

I have got the meaning for regexp from
http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?regular+expression

The part of the code written is

main -->
 	print(" Enter an integer : "), flush_output,
 	io__read_line_as_string(IntString),
 	{
 		IntString = ok(Int_line),
 		remove_suffix(Int_line, "\n", ResStr),
 		string__det_to_int(ResStr) = ResDetInt,
 		ResDt = ResDetInt,
 		;
 		throw(" Error")
 	}, nl,
 	print(" A signed base of 10 converted to an integer is : "),
 	print(ResDt), nl,


What I want to understand is if I give a value to IntString as 
123, then ResDet also gives me the value as 123. I really cannot 
see how  string__det_to_int works. I really would like to know.

Thanks and Regards,

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
--------------------------------------------------------------------------

