New
Syntax (version 1):
New <Type ID>[(<Param1>,
<Param2>, …)]
Parameters:
Type ID
The type ID for the new value.
<Param1>, <Param2>, …
After the type ID, you can specify parameters
in brackets if they are defined in constructors for this type. The
number of parameters and their purposes are specified in the
definitions of object constructors.
Syntax (version 2):
New(<Type>[,
<ConstructorParameters>])
Parameters:
Type
The type name or a value of Type type.
ConstructorParameters
An array of constructor parameters.
Description:
Creates a value of the specified type. It is only available
for types that support creation using this operator (for details,
see the descriptions of 1C:Enterprise script objects).
For applied objects, use the functional form of the New operator
(version 2) for applied objects because applied object types are
not defined during the module check in Designer.
If the second parameter value is not an array, it is completely
ignored.
Example1:
SaveList = New Structure; DataStorage = New ValueStorage(SaveList); |
Example2:ValueType = Type("StringQualifiers");
Parameters = New Array(2);
Parameters[0] = 20;
Parameters[1] = AllowedLength.Variable;
StrQual = New(ValueType, Parameters);