There are, as always in computer software development, a number of ways. The first two off the top of my head are
1. Use the absolute function i.e. abs(-1) returns 1
2. Multiply the result of the subtraction by -1 i.e.
answer = 9 - 10
if answer < 0 then
answer = answer * -1
endif
HTH