[M3commit] CVS Update: cm3

Rodney M. Bates rodney at elego.de
Sat Jan 18 18:50:58 CET 2014


CVSROOT:	/usr/cvs
Changes by:	rodney at birch.	14/01/18 18:50:58

Modified files:
	cm3/m3-sys/m3front/src/types/: Tag: devel_unicode EnumType.m3 
	                               SubrangeType.m3 Type.m3 

Log message:
	In the compiler, allow, e.g.,
	CharVariable := WidecharVariable, with range check, and
	WidecharVariable := CharVariable.
	
	Specifically:
	
	1) CHAR and WIDECHAR are called _character types_
	1) (Addition to 2.2.10): CHAR <: WIDECHAR
	3) (Change to 2.2.10):
	For ordinal types, T and U, T <: U if (they have the same basetype
	*or both basetypes are character types*) and every member of T is a
	member of U.
	
	Note that this does not suffer from the problems that a value subset relation
	and subtype relation between different integer types would have.
	
	A) The integer value sets do not necessarily have a subset relation at all.
	CHAR and WIDECHAR do, because Unicode has carefully made the first
	256 code points the same as ISO-Latin-1.
	
	B) The resolution of builtin, overloaded arithmetic operators on integer types
	would become a mess.  In contrast, characters have no operators that
	compute new character values.




More information about the M3commit mailing list