|This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. For information on the feature that replaced this one, see () of () (Operators block).|
The absolute value is the distance of a number from 0. Another way to describe absolute value is that it makes a number positive—if it is negative, it becomes positive, and if it is positive, it stays positive. For example, the absolute value of -3 is +3 and the absolute value of +4 is +4. The mathematical way to write absolute value is |number|. For example, abs(-3) is the same as |-3|.
This block could be replicated with the following code:
if <(num) < (0)> then set [abs v] to ((num) * (-1)) else set [abs v] to (num) end
The new block
([abs v] of (9))