Page 1 of 1

Why should I use system.empty in a set

Posted: Thu Feb 28, 2019 8:48 am
by Renger
Hi

In the first example of the embedded code documentation, the following code is shown:

Code: Select all

Set cc      / "France - Paris", "France - Lille", "France - Toulouse" 
              "Spain - Madrid", "Spain - Cordoba", "Spain - Seville", "Spain - Bilbao" 
              "USA - Washington DC", "USA - Houston", "USA - New York", 
              "Germany - Berlin", "Germany - Munich", "Germany - Bonn" / 
    country / system.empty / 
    city    / system.empty / 
    mccCountry(cc,country), mccCity(cc,city); 
What is the reason for using /system.empty/ as it seems to work fine when I drop the /system.empty/:

Code: Select all

    country 
    city   
Cheers
Renger

Re: Why should I use system.empty in a set

Posted: Fri Mar 01, 2019 9:22 am
by Lutz
Renger,

In general the system.empty is used to initialize an empty set and set its dimension (1 in this example) at the same time. But you are right, that it is actually not needed in this example.

Best regards,
Lutz