alguidelines/content/NAVPatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/index.md
2021-10-30 22:09:32 +02:00

26 lines
380 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
IF NOT(Type = Type::Item) THEN
Good code
IF NOT (Type = Type::Item) THEN
Bad code
DiscAmt := - "Discount Amount";
Good code
DiscAmt := -"Discount Amount";