ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Country and Continent functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Warning
From version 25, this function is kept for backward compatibility. We recommend that you use Continent and country management functions.
Returns the list of countries according to the ISO 3166-1 standard.
Example
// Initialize the list of countries
ListAdd(LIST_CountryList, GetCountryList())
// Fill a Table control with the list of countries
// (as well as information about each country).
FOR EACH STRING sCountry OF GetCountryList(lcAll) SEPARATED BY CR
TableAdd(TABLE_Country, sCountry)
END
// This example shows how to fill in a Combo Box control with the list of 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
gStoredValueEnable(COMBO_Country, True)
FOR EACH STRING sCountry OF GetCountryList(lcCaption + lcAlpha3Code) SEPARATED BY CR
ListAdd(COMBO_Country, ExtractString(sCountry, 1) + gStoredValue(ExtractString(sCountry, 2)))
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> = GetCountryList([<Information to return>])
<Result>: Character string
List (in alphabetical order) of countries with the requested information in the following format:
[<Caption Country 1>][ + TAB + <Alpha ISO code on 2>] [ + TAB + <Alpha ISO code on 3>]
[+ TAB + <Numeric ISO code>] [+ TAB + <Value of Nation constant>] + CR + ...
[<Caption Country N>][ + TAB + <Alpha ISO code on 2>] [ + TAB + <Alpha ISO code on 3>]
[+ TAB + <Numeric ISO code>] [+ TAB + <Value of Nation constant>]
<Information to return>: Optional combination of Integer constants
Combination of constants used to select the information to retrieve:
lcAll
(Default value)
The entire information about countries.
lcAlpha2CodeAlphabetical ISO code on 2 characters.
lcAlpha3CodeAlphabetical ISO code on 3 characters.
lcCaptionCaption of country.
lcNationInteger corresponding to the constant of the country for Nation.
lcNumericCodeNumeric ISO code.
Remarks
  • The list of countries is the one defined by the ISO 3166-1 standard at 26/06/2019.
  • Some countries don't have any corresponding constants for Nation. In this case, the value of the constant is set to 0.
Component: wd290std.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help