Click or drag to resize

SetInternational Function (String)

X#
Return and optionally change the setting that determines the international mode for the application.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SetInternational(
	symNewSetting AS STRING
) AS STRING
Request Example View Source

Parameters

symNewSetting
Type: String
The international mode to use.
The available modes are #Windows (the default) and #Clipper.

Return Value

Type: String
If symNewSetting is not specified, SetInternational() returns the current setting.
If symNewSetting is specified, the previous setting is returned.
Remarks
SetInternational() allows X# to operate in different international modes.
The #Clipper mode is provided for compatibility with CA-Clipper applications and uses an internationalization routine defined in the nation module (VO28NAT.DLL).
The #Windows mode uses international services provided by Windows. Therefore, if an application uses the #Clipper international mode, it will behave the same on all machines. Thus, to achieve a different internationalization routine, you would need a specialized version of VO28NAT.DLL. On the other hand, if the application uses the #Windows international mode, it will behave differently from machine to machine, depending on information defined in the International settings of the Control Panel. Changing SetInternational() automatically changes SetCollation() so that the two settings are the same. SetInternational() also determines the initial defaults for the functions listed in the table below and resets them each time you call the function.
For SetInternational(#Windows), the settings are taken from the corresponding International settings in the Control Panel: Function SetInternational(#Clipper) Default GetAMExt()/SetAMExt() NULL_STRING GetPMExt()/SetPMExt() NULL_STRING SetAMPM() 24-hour format SetDateFormat() mm/dd/yy SetDecimal() 2 SetDecimalSep() Period (.) SetTimeSep() Colon (:) SetThousandSep() Comma (,)
Tip Tip
Leading zeros in time strings:
The leading zeros International setting in the Control Panel is ignored. Leading zeros are always displayed for time strings. Decimal and thousand separators in picture clauses:
The comma as the thousands separator and the period used as the decimal separator in picture clauses is unaffected by this setting.
Therefore, your source code will not change based on the status of SetInternational(). Note that picture clauses are defined with the @...SAY...GET command, the Transform() function, or the FieldSpec:Picture property. @E picture function:
The @E picture function is ignored if SetInternational(#Windows) is in effect.
Remarks
SetInternational() allows XSharp apps to operate in different international modes. The "CLIPPER" mode is provided for compatibility with CA-Clipper applications and uses an internationalization routine defined in the nation module.
The "Windows" mode uses international services provided by Windows. When you set this mode several settings will be changed
SettingInitial value in CLIPPER mode
SetAmExtEmpty String
SetPmExtEmpty String
SetAmPmFALSE (24 hour format)
SetCenturyFALSE
SetDateCountryAmerican (1)
SetDateFormatmm/dd/yy
SetDecimal2
SetDecimalSepPeriod (.)
SetThousandSepComma (,)
SetTimeSepColon(:)
Examples
This example sets the international mode to #Clipper in the application's startup routine in order to maintain backward compatibility with CA-Clipper applications. Note that SetCollation() is also changed to #Clipper as a result:
X#
1METHOD Start() CLASS App
2    ...
3    SetInternational(#Clipper)
4    ...
See Also