Skip to content

Commit

Permalink
Merge pull request #3337 from 1c-syntax/translations_dbfcc2360538b49f…
Browse files Browse the repository at this point in the history
…3dc1815c351750c2_en

Updates for file docs/diagnostics/DoubleNegatives.md in en
  • Loading branch information
nixel2007 authored Aug 20, 2024
2 parents 7a7ce89 + 2f5258c commit 10311fc
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions docs/en/diagnostics/DoubleNegatives.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
# Double negatives (DoubleNegatives)

<!-- Блоки выше заполняются автоматически, не трогать -->
## Description

Using double negatives complicates the understanding of the code and can lead to errors when instead of truth the developer "in his mind" calculated False, or vice versa. It is recommended to replace double negatives with conditions that directly express the author's intentions.

## Examples

### Wrong

```bsl
If Not ValueTable.Find(ValueToSearch, "Column") <> Undefined Тогда
// Act
EndIf;
```

### Correct

```bsl
If ValueTable.Find(ValueToSearch, "Column") = Undefined Тогда
// Act
EndIf;
```

## Sources

* Источник: [Remove double negative](https://www.refactoring.com/catalog/removeDoubleNegative.html)
* Description

0 comments on commit 10311fc

Please sign in to comment.