TSLanguage
What: class
File: _Languag
Ancestor: TBase_Object
Layer: 1
Platforms: C++, C#, Javascript, Pascal (Object), PHP, Python
This abstract base class is the ancestor of classes specific to different languages.
They are used to translate a numeric value to words in the appropriate language.
It includes the following methods:
Generic_String_To_Numeric
bool Generic_String_To_Numeric( string S, double& Numeric, int& Typ )
function Generic_String_To_Numeric( S : string ; var Numeric : double ; var Typ : integer ) : boolean
Converts a numeric string to a number and returns
the type of the value. The return is True if the
passed numeric string is recognized or false
otherwise. This differs from String_To_Numeric in
that it recognizes only strings containing valid
prefix and suffixes, even if the specific
combination is not a recognized word in the targe language. For
example, "centgram" would be recognized as a
100-sided 2D object in English. However, strings without both
prefix and suffix are not recognized (such as "one", or "hex"). Typ returned is one of the NTS_* constant values.
Numeric_Extent
int Numeric_Extent( string S )
function Numeric_Extent( S : string ) : integer
Determines last position in S that is part of a
number in the target language. Returns < 1 if S doesn't start
with a valid number in the target language.
Numeric_To_String
string Numeric_To_String( double Numeric, int Typ )
function Numeric_To_String( Numeric : double ; Typ : integer ) : string
Converts a number to a specific numeric string. Typ is one of the NTS_* constants.
String_To_Numeric
bool String_To_Numeric( string S, double& Numeric, int& Typ )
function String_To_Numeric( S : string ; var Numeric : double ; var Typ : integer ) : boolean
Converts a numeric string to a number and returns the type of the value. The return is True if the
passed numeric string is recognized or false otherwise. Typ returned is one of the NTS_* constant values.
To_Numeric
bool To_Numeric( string S, double& Numeric )
function To_Numeric( S : string ; var Numeric : double ) : boolean
Converts a numeric string to a number. The return is True if the
passed numeric string is recognized or false otherwise.