Not only in one line but also you don't need to wrap your function argument with a class instantiation, you can just pass the integer into the function you are calling and the compiler takes care of the rest.
And that is a problem with many class based languages, that a class can't work as a primitive, compare Java's int vs Integer.
program TestType;
type age = 0..150;
procedure test(age:age);
begin
writeln(age);
end;
begin
test(100);
test(200);
end.
And that is a problem with many class based languages, that a class can't work as a primitive, compare Java's int vs Integer.