If you use the absolute-value sign as a grouping symbol, then:
|1 ÷ (9 - 8) - 7| = |1 ÷ 1 - 7| = |1 - 7| = |-6| = 6
If we write 1 - 9 + 8 + 7, this equals:
-8 + 8 + 7 = 0 + 7 = 7 by the Order of Operations
Finally, if we write 1 + 9 - 8 + 7, this equals:
10 - 8 + 7 = 2 + 7 = 9 by Order of Operations