I've tweaked it a bit to now look like this. Trialed it out with some examples:
if m < 40 then print (m, `Fail`)
elif m < 50 then print (m, `Third Class`)
elif m < 60 then print (m, `Lower Second Class`)
elif m < 70 then print (m, `Upper Second Class`)
elif m < 100 then print (m, `First Class`)
elif m > 100 then print (`error`)
else end if;
proc(m::positive) ... end;
40.9, Third Class
Error, invalid input: Marks expects its 1st argument, m, to be of type positive,
but received One
The error above shows that the procedure understood that numeric values
were the only values to be considered therefore showed an error.
How can I then add this part of the question to my procedure?
If the mark is within 3 marks of the interval’s upper bound, a statement should be added
indicating that the grade is ‘borderline’.