[mercury-users] string

Michael Day mcda at cat.cs.mu.OZ.AU
Fri Dec 3 21:08:28 AEDT 1999


Hi,

does anyone have any ideas on the best way to achieve a string type that
is parameterized by character type? ie:

:- type string(T).
:- type string == string(char).

given that string is currently a built in type it is not immediately
obvious to me how to change it in this way, and how many things it would
break. Two alternatives appear to be defining string to be a list
(inefficient) or as an array (currently problematic?), however neither of
those would allow the use of string literals.

Perhaps this issue can be side stepped by changing the definition of char
and string to wchar or some other type at the C level, any advice anyone?

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