1
0
mirror of https://github.com/1C-Company/v8-code-style.git synced 2024-12-12 21:29:46 +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

533 B

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

&Around("MyFunction")
Function Ext1_MyFunction()
	
	//Return 1;
	Return 2;
	
EndFunction

Compliant Solution

&ChangeAndValidate("MyFunction")
Function Ext1_MyFunction()
	
	#Delete
	Return 1;
	#EndDelete
	#Insert
	Return 2;
	#EndInsert
	
EndFunction

See