alguidelines/content/NAVPatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/index.md
2022-02-05 19:44:44 +01:00

32 lines
392 B
Markdown

+++
title = "Spacing Unary Operators"
weight = 1140
+++
There must be no space between a unary operator and its argument (except for the NOT keyword).
Bad code
```al
IF NOT(Type = Type::Item) THEN
```
Good code
```al
IF NOT (Type = Type::Item) THEN
```
Bad code
```al
DiscAmt := - "Discount Amount";
```
Good code
```al
DiscAmt := -"Discount Amount";
```