1
0
mirror of https://github.com/1C-Company/v8-code-style.git synced 2025-02-01 22:00:08 +02:00
v8-code-style/bundles/com.e1c.v8codestyle.bsl/markdown/change-and-validate-instead-of-around.md
2021-09-29 11:39:41 +03:00

35 lines
533 B
Markdown

# Use pragma &ChangeAndValidate instead of &Around
Starting with the platform 8.3.16, you can use pragma &ChangeAndValidate instead of pragma &Around in cases where there is no ProceedWithCall call inside the method
## Noncompliant Code Example
```bsl
&Around("MyFunction")
Function Ext1_MyFunction()
//Return 1;
Return 2;
EndFunction
```
## Compliant Solution
```bsl
&ChangeAndValidate("MyFunction")
Function Ext1_MyFunction()
#Delete
Return 1;
#EndDelete
#Insert
Return 2;
#EndInsert
EndFunction
```
## See