title: “GoWeb UNARY MINUS Operator” author: “Pierre Laplante” date: 2025-08-30 version: “1.0.0” section: “1g”
UNARY MINUS Operator
This document explains the usage of the unary minus (-
) operator in GoWeb.
The unary minus is used to represent negative numbers and to invert the sign of numeric values.
-
before a number makes it negative.-
before a variable inverts its sign.res={ -5; }.
Result:
res=-5.
res={ a := -5; a; }.
Result:
res=-5.
res={ a := -5; -a; }.
Result:
res=5.
res={ a := 5 - -5; a; }.
Result:
res=10.
res={ a := -5; a * -2; }.
Result:
res=10.