filmov
tv
Module 1. Day 2. Built-in Functions
Показать описание
Before considering the built-in functions, we should discuss such a valuable option as Syntax Assistant.
Help → Syntax Assistant
With the help of this tool, we can get any information and help on the 1C:Enterprise syntax and content.
For example, we can learn information about operators and syntax constructions. Especially about the primitive types, we have learned before
Now let’s talk about functions for working with values for type String
Consider the most commonly used functions for type String;
In this code, we delete extra spaces on the left and the right of the string with the help function TrimAll(). Also, we show the string’s length utilizing function StrLen(). After that, we replace “UserName!” in the string element with “World!!!” using function StrReplace().
Here is the result of our coding
Now consider the built-in functions for type Number
We start with calculating the integer sum of Number1and Number2 with function Int(). After that, we round off the calculated sum using function Round(). Remember that we can assign these interim values to any variable.
And here is the result
And finally we can discuss the built-in functions for type Date
This is how we have obtained the current month’s end date and time using the function EndOfMonth(). We also added two months to the current date with the help of function Addmonth().
Help → Syntax Assistant
With the help of this tool, we can get any information and help on the 1C:Enterprise syntax and content.
For example, we can learn information about operators and syntax constructions. Especially about the primitive types, we have learned before
Now let’s talk about functions for working with values for type String
Consider the most commonly used functions for type String;
In this code, we delete extra spaces on the left and the right of the string with the help function TrimAll(). Also, we show the string’s length utilizing function StrLen(). After that, we replace “UserName!” in the string element with “World!!!” using function StrReplace().
Here is the result of our coding
Now consider the built-in functions for type Number
We start with calculating the integer sum of Number1and Number2 with function Int(). After that, we round off the calculated sum using function Round(). Remember that we can assign these interim values to any variable.
And here is the result
And finally we can discuss the built-in functions for type Date
This is how we have obtained the current month’s end date and time using the function EndOfMonth(). We also added two months to the current date with the help of function Addmonth().