Help / WLanguage / WLanguage functions / Standard functions / Windows management functions / Country and Continent functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Returns the list of all countries or countries of a given continent according to ISO 3166-1.
Remark: The list of countries is the one defined by the ISO 3166-1 standard at 15/10/2019.
// Initialize the list of countries
arrCountryList is array of Countries = CountryList()
FOR EACH oCountry OF arrCountryList
ListAdd(LIST_CountryList, oCountryName)
// Fill a Table control with the list of countries
// (as well as information about each country).
arrCountryList is array of Countries = CountryList()
FOR EACH oCountry OF arrCountryList
TableAddLine(TABLE_Country, oCountry.Name, oCountry.ISOCode2, oCountry.ISOCode3, ...
oCountry.ISOCodeNum, oCountry.Continent.Name, oCountry.Flag, ...
oCountry.Nation, oCountry.PhoneNumberPrefix)
// This example shows how to fill in a Combo Box control with the list of European countries.
// The caption of the country is displayed.
// The numeric code of the country is stored.
// The code of the country is stored and retrieved using gStoredValue.
// -- Initialize the Combo Box control
arrCountryList is array of Countries = CountryList(continentEurope)
gStoredValueEnable(COMBO_Country, True)
FOR EACH oCountry OF arrCountryList
ListAdd(COMBO_Country, oCountry.Name + gStoredValue(oCountry.ISOCode3))
// -- Selecting a row in the Combo Box control
Info("The name of the country is: " + COMBO_Country.DisplayedValue, ...
"The country code is: " + COMBO_Country.StoredValue)
<Result> = CountryList([<Continent>])
<Result>: Array of Country variables
Array of Country variables that contains the list of countries.
<Continent>: Optional character string, optional Continent variable or optional constant
Continent for which countries must be listed. This parameter can correspond to:
  • a variable of type Continent,
  • the caption of the desired continent (in English, Spanish or French).
  • a constant that identifies the continent (or 2-character continent code):
    continentAfricaAfrica (constant set to "AF").
    continentAntarcticaAntarctica (constant set to "AN").
    continentAsiaAsia (constant set to "AS").
    continentEuropeEurope (constant set to "EU").
    continentNorthAmericaNorth America (constant set to "NA").
    continentOceaniaOceania (constant set to "OC").
    continentSouthAmericaSouth America (constant set to "SA").
If this parameter is not specified, the result contains the list of all countries.
Related Examples:
Country and Continent functions Unit examples (WINDEV): Country and Continent functions
[ + ] This example shows how to use Country / Continent variables and functions.
Business / UI classification: Business Logic
Component: wd290std.dll
Minimum version required
  • Version 25
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help