Is your feature request related to a problem? Please describe.
requireInt is a universal typechecker but it does not go far enough for certain situations.
The very typical variable type unsigned is not currently covered by a type checker in MSU
Describe the solution you'd like
Add a new requireUnsigned function that would look like the following
::MSU.requireUnsigned <- function( ... )
{
::MSU.requireInt(vargv);
foreach (value in vargv)
{
if (value < 0)
{
::logError(value + " must have the type: unsigned");
throw ::MSU.Exception.InvalidType(value);
}
}
}
Additional context
This is the situation where I currently need such a function in my code.
Is your feature request related to a problem? Please describe. requireInt is a universal typechecker but it does not go far enough for certain situations. The very typical variable type unsigned is not currently covered by a type checker in MSU
Describe the solution you'd like Add a new
requireUnsigned
function that would look like the followingAdditional context This is the situation where I currently need such a function in my code.