PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
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.
Example
// Initialize the list of countries
arrCountryList is array of Countries = CountryList()
FOR EACH oCountry OF arrCountryList
ListAdd(LIST_CountryList, Country, Name)
END
 
// 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)
END
// 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 it is retrieved by gLink.
//---------------------------------------------------------------
// -- Initialize the Combo Box control
arrCountryList is array of Countries = CountryList(continentEurope)
gLinkActivate(COMBO_Country, True)
FOR EACH oCountry OF arrCountryList
ListeAjdd(COMBO_Country, Country..Name + gLink(oCountry..ISOCode3))
END
//--------------------------------------------------------------
// -- 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)
Syntax
<Result> = CountryList([<Continent>])
<Result>: Array of Country variables
Array of Country variables that contain 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 Continent variable,
  • 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").
    continentNorthAmericaNorth America (constant set to "NA").
    continentSouthAmericaSouth America (constant set to "SA").
    continentAntarcticaAntarctica (constant set to "AN").
    continentAsiaAsia (constant set to "AS").
    continentEuropeEurope (constant set to "EU").
    continentOceaniaOceania (constant set to "OC").
If this parameter is not specified, the result contains the list of all countries.
Business / GUI classification : Business Logic
Component : wd250std.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment