alguidelines/content/docs/NAVPatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/index.md
2022-02-24 14:45:35 +01:00

34 lines
481 B
Markdown

+++
title = "Unnecessary Function Parenthesis"
weight = 1280
tags = ["C/AL","Readability"]
categories = ["Best Practice"]
+++
Do not use parenthesis in a function call if the function does not have any parameters.
Bad code
```al
IF ReservMgt.IsPositive() THEN
```
Good code
```al
IF ReservMgt.IsPositive THEN
```
Bad code
```al
IF ChangeStatusForm.RUNMODAL() <> ACTION::Yes THEN
```
Good code
```al
IF ChangeStatusForm.RUNMODAL <> ACTION::Yes THEN
```