While Integer inherits from IntegerNumberSystem the category
StepThrough, the domains NNI and PI do not share this natural property.
I have added this, however, while init() overwrites the inherited
functiom init() (as a subdomain of Integer), this is not the case for
the correct nextItem, i.e. the interpreter chooses the function from
Integer and not from the domain PI itsself:
(1) -> init()$Integer
(1) 0
Type: Integer
(2) -> nextItem %
(2) 1
Type: Union(Integer,...)
(3) -> nextItem %
(3) - 1
Type: Union(Integer,...)
(4) -> nextItem %
(4) 2
Type: Union(Integer,...)
after compilation of integer-jg.spad, which I include:
(6) -> init()$NNI
(6) 0
Type: NonNegativeInteger
(7) -> nextItem %
(7) 1
Type: Union(Integer,...)
(8) -> nextItem %
(8) - 1
Type: Union(Integer,...)
(9) -> init()$PI
(9) 1
Type: PositiveInteger
(10) -> nextItem %
(10) - 1
Type: Union(Integer,...
--
Mit freundlichen Grüßen
Johannes Grabmeier
Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel.
+49-(0)-991-2979584, Tel.
+49-(0)-151-681-70756
Tel.
+49-(0)-991-3615-141 (d), Fax: +49-(0)-32224-192688