The expressions to the right of the '=' sign are evaluated from left to right.

Then, the assignment operations of variables on the left of the sign are performed from left to right.

There is no dependencies between the expressions on the right and the ones on the left. On the other hand, there can be a dependency between the variables on the left.

If the number of variables is less than the number of values (N less than M), a compilation error will occur.

If the number of variables is greater than the number of values (N greater than or equal to M), only the first variables will be assigned.

Versions 20 and laterTo assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

New in version 20To assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

To assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

Examples:

(x, y, z) = (5, 8, 12)// x is set to 5, y is set to 8, z is set to 12

(x, y, z) = (25, 38)// x is set to 25, y is set to 38, z is not assigned

(x, , z) = (14, 87)// x is set to 14, y is not assigned, z is set to 87

(t[Subscript1()], t[Subscript2()]) = (Calc1(), calc2())// The execution order of procedures is as follows: // Calc1()// Calc2()// Subscript1()// Subscript2()// then t[Subscript1()] is assigned the value of Calc1()// then t[Subscript2()] is assigned the value of Calc2()

(i, t[i]) = (1, "ABC")// First assigns 1 to i// Then assigns "ABC" in t to the subscript i

New in version 19

Multiple assignment

The '=' operator can also be used to assign several variables in a single code line.

The expressions to the right of the '=' sign are evaluated from left to right.

Then, the assignment operations of variables on the left of the sign are performed from left to right.

There is no dependencies between the expressions on the right and the ones on the left. On the other hand, there can be a dependency between the variables on the left.

If the number of variables is less than the number of values (N less than M), a compilation error will occur.

If the number of variables is greater than the number of values (N greater than or equal to M), only the first variables will be assigned.

Versions 20 and laterTo assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

New in version 20To assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

To assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

Examples:

(x, y, z) = (5, 8, 12)// x is set to 5, y is set to 8, z is set to 12

(x, y, z) = (25, 38)// x is set to 25, y is set to 38, z is not assigned

(x, , z) = (14, 87)// x is set to 14, y is not assigned, z is set to 87

(t[Subscript1()], t[Subscript2()]) = (Calc1(), calc2())// The execution order of procedures is as follows: // Calc1()// Calc2()// Subscript1()// Subscript2()// then t[Subscript1()] is assigned the value of Calc1()// then t[Subscript2()] is assigned the value of Calc2()

(i, t[i]) = (1, "ABC")// First assigns 1 to i// Then assigns "ABC" in t to the subscript i

Multiple assignment

The '=' operator can also be used to assign several variables in a single code line.

The expressions to the right of the '=' sign are evaluated from left to right.

Then, the assignment operations of variables on the left of the sign are performed from left to right.

There is no dependencies between the expressions on the right and the ones on the left. On the other hand, there can be a dependency between the variables on the left.

If the number of variables is less than the number of values (N less than M), a compilation error will occur.

If the number of variables is greater than the number of values (N greater than or equal to M), only the first variables will be assigned.

Versions 20 and laterTo assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

New in version 20To assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

To assign the same value to all the variables, all you have to do is use the following syntax:

( <Variable 1>, <Variable 2>, ... <Variable N> ) = <Value>

For example:

(x,y,z) = 0

Not available.

Examples:

(x, y, z) = (5, 8, 12)// x is set to 5, y is set to 8, z is set to 12

(x, y, z) = (25, 38)// x is set to 25, y is set to 38, z is not assigned

(x, , z) = (14, 87)// x is set to 14, y is not assigned, z is set to 87

(t[Subscript1()], t[Subscript2()]) = (Calc1(), calc2())// The execution order of procedures is as follows: // Calc1()// Calc2()// Subscript1()// Subscript2()// then t[Subscript1()] is assigned the value of Calc1()// then t[Subscript2()] is assigned the value of Calc2()

(i, t[i]) = (1, "ABC")// First assigns 1 to i// Then assigns "ABC" in t to the subscript i

Assignment by copy: <=

The assignment by copy always forces the copy of the source element into the destination element.

A new memory zone is allocated to store the copied value.

Versions 17 and later

Assignment by copy on the arrays

The <= operator can be used on the arrays.These arrays can have diferent types.The assignment is using the implicit conversions of WLanguage (like the = operator would do =).

Example:

// Declare two arrays of same size and different types (integer and boolean)arrIntegers is arrayof3 by 2intarrBooleans is arrayof3 by 2booleans

The mechanism of homonymic copy uses the <= operator to transfer the data from a structured element to another structured element.

During the copy, the members with the same name are automatically copied from the source structured element to the destination structured element. The type conversions will be automatically performed.

This allows you to:

transfer the content of structure members to the items of a HyperFileSQL file, transfer the content of structure members to the items of an HFSQL file,

transfer the members of advanced type (Email for example) to the members of a class.

The following structured types can be handled:

structures,

classes,

advanced types,

HyperFileSQL files,

queries,

data sources.

Example: Copying classes

// Declare the classesClass_1 is Classcommon is intmember_1 is intEND

Class_2 is Classcommon is intmember_2 is intEND

// Assignmento1 is Class_1o1.common = 1o1.member_1 = 1

o2 is Class_2o2.common = 2o2.member_2 = 2

// Copyo1 <= o2

// Result// o1.common = 2// o1.member_1 = 1

Remarks:

The <= operator can be replaced by the = operator when the operating mode presents no ambiguity.

For the structures and classes, each member can be followed by a "Mapping" attribute. This attribute is used to specify the name of the member that must be "mapped" to the structure member or to the class member. Example:

// Declare the classesClass_Simple_1 is Classcommon is intmember_1 is intEND

For advanced types with dynamic sub-elements (for example, the xmlNode type or the structured elements of a web service), the sub-elements have priority over the standard properties of the type. Example:

// Declare the classesClass_xmlNode is Class Name is stringTag1 is stringTag2 is stringEND

The "mapping" attribute is allowed for the members of the structure or source or destination class (but not for both).

If a derived member has the same name as a member of the base class or a mapping with the same name, only the name of the derived class is taken into account.

Limit: The homonymic copy is not available:

on .Net objects,

on automation objects,

if the source and the destination are advanced types with dynamic sub-elements.

New in version 17

Homonymic copy

The mechanism of homonymic copy uses the <= operator to transfer the data from a structured element to another structured element.

During the copy, the members with the same name are automatically copied from the source structured element to the destination structured element. The type conversions will be automatically performed.

This allows you to:

transfer the content of structure members to the items of a HyperFileSQL file, transfer the content of structure members to the items of an HFSQL file,

transfer the members of advanced type (Email for example) to the members of a class.

The following structured types can be handled:

structures,

classes,

advanced types,

HyperFileSQL files,

queries,

data sources.

Example: Copying classes

// Declare the classesClass_1 is Classcommon is intmember_1 is intEND

Class_2 is Classcommon is intmember_2 is intEND

// Assignmento1 is Class_1o1.common = 1o1.member_1 = 1

o2 is Class_2o2.common = 2o2.member_2 = 2

// Copyo1 <= o2

// Result// o1.common = 2// o1.member_1 = 1

Remarks:

The <= operator can be replaced by the = operator when the operating mode presents no ambiguity.

For the structures and classes, each member can be followed by a "Mapping" attribute. This attribute is used to specify the name of the member that must be "mapped" to the structure member or to the class member. Example:

// Declare the classesClass_Simple_1 is Classcommon is intmember_1 is intEND

For advanced types with dynamic sub-elements (for example, the xmlNode type or the structured elements of a web service), the sub-elements have priority over the standard properties of the type. Example:

// Declare the classesClass_xmlNode is Class Name is stringTag1 is stringTag2 is stringEND

The "mapping" attribute is allowed for the members of the structure or source or destination class (but not for both).

If a derived member has the same name as a member of the base class or a mapping with the same name, only the name of the derived class is taken into account.

Limit: The homonymic copy is not available:

on .Net objects,

on automation objects,

if the source and the destination are advanced types with dynamic sub-elements.

Homonymic copy

The mechanism of homonymic copy uses the <= operator to transfer the data from a structured element to another structured element.

During the copy, the members with the same name are automatically copied from the source structured element to the destination structured element. The type conversions will be automatically performed.

This allows you to:

transfer the content of structure members to the items of a HyperFileSQL file, transfer the content of structure members to the items of an HFSQL file,

transfer the members of advanced type (Email for example) to the members of a class.

The following structured types can be handled:

structures,

classes,

advanced types,

HyperFileSQL files,

queries,

data sources.

Example: Copying classes

// Declare the classesClass_1 is Classcommon is intmember_1 is intEND

Class_2 is Classcommon is intmember_2 is intEND

// Assignmento1 is Class_1o1.common = 1o1.member_1 = 1

o2 is Class_2o2.common = 2o2.member_2 = 2

// Copyo1 <= o2

// Result// o1.common = 2// o1.member_1 = 1

Remarks:

The <= operator can be replaced by the = operator when the operating mode presents no ambiguity.

For the structures and classes, each member can be followed by a "Mapping" attribute. This attribute is used to specify the name of the member that must be "mapped" to the structure member or to the class member. Example:

// Declare the classesClass_Simple_1 is Classcommon is intmember_1 is intEND

For advanced types with dynamic sub-elements (for example, the xmlNode type or the structured elements of a web service), the sub-elements have priority over the standard properties of the type. Example:

// Declare the classesClass_xmlNode is Class Name is stringTag1 is stringTag2 is stringEND