Ada Programming/Attributes/'Mod

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Description

[edit | edit source]

Will correctly convert any integer type to a given modular type (S), using wraparound semantics.

This function returns Arg mod S'Modulus, as a value of the type of S.

Example

[edit | edit source]
SMod (X:T) return S