# Spacing Unary Operators

##### Tags:

- C/AL
- Readability

##### Categories:

- Best Practice

There must be no space between a unary operator and its argument (except for the NOT keyword).

Bad code

    IF NOT(Type = Type::Item) THEN

Good code

    IF NOT (Type = Type::Item) THEN

Bad code

    DiscAmt := - "Discount Amount";

Good code

    DiscAmt := -"Discount Amount";

Last modified February 24, 2022: Added tags & categories + cleanup (5ee04366) by waldo1001