Main > Knowledge Base > Best practices > Code conventions > Using 1C:Enterprise script clauses > Defining variable value type > Best practices > Code conventions > Using 1C:Enterprise script clauses > Defining variable value type > Best practices > Code conventions > Using 1C:Enterprise script clauses > Defining variable value type

Defining variable value type

This article describes the standards that apply to define variable value types. All of the listed recommendations are mandatory unless noted otherwise.

To define a variable value type, use comparison with a type. Do not use any other methods.

Correct:

If TypeOf(Ref) = Type("DocumentRef.GoodsReceipt") Then

Incorrect:

If Ref.Metadata().Name = "GoodsReceipt" Then

Next page: Event log usage specifics




© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.