EnglishРусский  
The project is closed! You can look at a new scripting language. It is available on GitHub.
Also, try our open source cross-platform automation software.

Ads

Installer and installation software
Commercial and Freeware installers.

with statement

The with construction allows you to simplify addressing the fields of a variable of the structural type. Let us take the following example.

customer mycust

mycust.id = i++
mycust.name = "John"
mycust.country = "US"
mycust.phone = "999 999 999"
mycust.email = "john@domain.com"
mycust.check = mycust.id + 100

As you can see, you have to specify the name of the variable each time. with allows you to drop the variable name inside its block. To do it, specify the variable name after the with keyword and you will be able to specify only the point and the name of the corresponding field in curly braces. You can embed with constructions inside each other.

customer mycust

with mycust
{
   .id = i++
   .name = "John"
   .country = "US"
   .phone = "999 999 999"
   .email = "john@domain.com"
   .check = .id + 100
}