April 25, 2024, 02:27:49 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Language Recommendations

Started by Steven Picard, October 11, 2006, 10:28:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Steven Picard

October 11, 2006, 10:28:37 AM Last Edit: October 11, 2006, 12:54:22 PM by stevenp
Paul,

Here's few things I'd like to see added to the core language.ÂÃ,  Hope you don't mind me suggesting these:

1) Regular Expressions:
ÂÃ,  ÂÃ,  Regular expressions are used for complex pattern matching in strings and can be found in several languages as standard functionality (example Java, Perl, Javascript, VBscript using an intrinsict object, etc.)
ÂÃ,  ÂÃ,  Using regular expressions you can easily making parser for XML, HTML, Languages, Wiki's, etc.
ÂÃ,  ÂÃ,  They are great for form and string validation (for example, an email address, SSN or phone number.)

ÂÃ,  ÂÃ,  Here's a web page that explains it in tutorial form for Javascript:
ÂÃ,  ÂÃ,  http://www.greggriffiths.org/webdev/clientside/javascript/regex/
ÂÃ,  ÂÃ,  Here's a place you can try out regular expressions once you start learning from the previous link:
ÂÃ,  ÂÃ,  http://www.regular-expressions.info/javascriptexample.htmlÂÃ, 

2) The following new String functions:
ÂÃ,  ÂÃ,  * Split - This will split a string into an array based on a token(s).
ÂÃ,  ÂÃ,  * Join - This will take a string array and join it into a single string using the optional token (such as a space, carriage return, HTML <BR>, etc).
ÂÃ,  ÂÃ,  * InstrRev - Same as Instr but begins at the end and checks in reverse.
ÂÃ,  ÂÃ,  * Replace - This will take a string and replace a sub-sub string with the new string..

3) Date functions.ÂÃ,  I find date functions to be sorely lacking in many languages yet most everyone needs them.ÂÃ, 
ÂÃ,  ÂÃ,  ÂÃ, * Now - returns the current data and time.
ÂÃ,  ÂÃ,  ÂÃ, * Month, Day, Year - each will take an optional date and return the month, day or year from it.ÂÃ,  If no date is passed then it defaults to today's date.
ÂÃ,  ÂÃ,  ÂÃ, * Hour, Minute, Second - same as above but with time (defaults to current time).
ÂÃ,  ÂÃ,  ÂÃ, * MonthName, WeekdayName - similar to the above two but returns the actual name (defaults to today's date).
ÂÃ,  ÂÃ,  ÂÃ, * DateAdd - Add a specified amount of days or time. Example: DateAdd("d",5, theDate), DateAdd("m",-1,theDate), DateAdd("s",100,theDateAndTime), etc.
ÂÃ,  ÂÃ,  ÂÃ, * DateDiff
ÂÃ,  ÂÃ,  ÂÃ, * IsLeapYear - Takes an optional date and returns whether it is a leap year (defaults to current year)
ÂÃ,  ÂÃ,  ÂÃ, * IsDate - Takes a string and returns whether it was a valid Date (not only needs to be formatted correctly but must be a correct date).
ÂÃ,  ÂÃ,  ÂÃ, * LastDayOfMonth - Takes an option date (defaults to today's date) and returns the last day of the month.

If you need further descriptions of anything, please let me know.

-Steven

Edited to add an explanation for what a Regular Expression is for those who do not know.

Rock Ridge Farm (Larry)

I actually have most of these as subroutines.
Guess I should post them.

Steven Picard

Subroutines are nice but I think these would make for nice built-in commands.

Parker

There really are no commands, it's just automatic includes and global subroutines. It's just a convenience thing.

Steven Picard

I should say:
I think these would make for nice standard commands that come with Aurora.
;)

Steven Picard

I went and added an explanation for what a regular expression is for those who do not know.  They are extremely powerful and versitile.  Please read up on it with the links I gave.

Parker

Lex is a nice application of regular expressions. It is used to create lexers for programming languages without having to write it all by hand, and they are very fast.

Steven Picard

Quote from: Parker on October 11, 2006, 01:13:50 PM
Lex is a nice application of regular expressions. It is used to create lexers for programming languages without having to write it all by hand, and they are very fast.
Regular Expression do far more than just that.  You wouldn't use Lex to validate a form entry such as an email address, phone number, SSN, etc.

They are different techniques for different applications.  I would write a serious BASIC interpretor with Regular expression but I would write an HTML or XML parser with one.

Steven Picard

When it comes to Regular Expressions, to really appreciate them it's necessary to have worked with them or taken effort to study them.  In the languages that use them as part of their core language, such as Perl, they are praised as one of the language's highlights.

Parker

Well Lex and Perl are the only regex experience I've had, so that's all I know :) I can see that there are lots of other uses than file processing though.

Steven Picard

October 11, 2006, 01:49:34 PM #10 Last Edit: October 11, 2006, 01:51:31 PM by stevenp
Quote from: Parker on October 11, 2006, 01:31:50 PM
Well Lex and Perl are the only regex experience I've had, so that's all I know :) I can see that there are lots of other uses than file processing though.
If you used Perl's regular expressions then you do know what I'm talking about. Sorry about that. :) In my lack of knowledge I only know Lex as a language parser (that's simply based on an assumption from some passing references to it I've read and with no personal first hand experience.)

But yes, there's many uses for them that are extremely handy.ÂÃ, 

Steven Picard

Quote from: stevenp on October 11, 2006, 01:49:34 PM
Quote from: Parker on October 11, 2006, 01:31:50 PM
Well Lex and Perl are the only regex experience I've had, so that's all I know :) I can see that there are lots of other uses than file processing though.
If you used Perl's regular expressions then you do know what I'm talking about. Sorry about that. :) In my lack of knowledge I only know Lex as a language parser (that's simply based on an assumption from some passing references to it I've read and with no personal first hand experience.)

But yes, there's many uses for them that are extremely handy which is why even scripting languages like Javascript and VBScript have them.ÂÃ, 

JR

Why not use the interfaces that VBScript uses for regular expressions? The following interface definitions allow to do it with Aurora.

Identifiers:


/****************************************************************************************/
// Library name: VBScript_RegExp_55
// Version: 5.5
// Documentation string: Microsoft VBScript Regular Expressions 5.5
// Path: D:\WINDOWS\system32\vbscript.dll\3
// Library GUID: {3F4DACA7-160D-11D2-A8E9-00104B365C9F}
// Code generated by TypeLib Browser 1.02 for the Aurora Compiler (c) 2006 by JosÃÆ'Ã,© Roca
// Date: 12 oct 2006   Time: 01:00:38
/****************************************************************************************/

/****************************************************************************************/
//
// To use these identifiers, save them in a file, create a new project, add the file to
// the project and compile it as an static library or as an object file. Then, in your
// application, use:
//
// #use "VBScript.lib"  // --> change name as needed
// #use "VBScript.o"    // --> if it has been compiled as an object file
// extern _CLSID_Match as GUID;
// extern _CLSID_MatchCollection as GUID;
// extern _CLSID_RegExp as GUID;
// extern _CLSID_SubMatches as GUID;
// extern _IID_IMatch as GUID;
// extern _IID_IMatch2 as GUID;
// extern _IID_IMatchCollection as GUID;
// extern _IID_IMatchCollection2 as GUID;
// extern _IID_IRegExp as GUID;
// extern _IID_IRegExp2 as GUID;
// extern _IID_ISubMatches as GUID;
//
/****************************************************************************************/

/****************************************************************************************/
/* ProgIDs (Program identifiers)                                                        */
/****************************************************************************************/

// PROGID_VBScriptRegExp = "VBScript.RegExp"

/****************************************************************************************/
/* ClsIDs (Class identifiers)                                                           */
/****************************************************************************************/

// {3F4DACA5-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_CLSID_Match, 0x3F4DACA5, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _CLSID_Match
_CLSID_Match:
    dd 0x3F4DACA5
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACA6-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_CLSID_MatchCollection, 0x3F4DACA6, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _CLSID_MatchCollection
_CLSID_MatchCollection:
    dd 0x3F4DACA6
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACA4-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_CLSID_RegExp, 0x3F4DACA4, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _CLSID_RegExp
_CLSID_RegExp:
    dd 0x3F4DACA4
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACC0-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_CLSID_SubMatches, 0x3F4DACC0, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _CLSID_SubMatches
_CLSID_SubMatches:
    dd 0x3F4DACC0
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

/****************************************************************************************/
/* IIDs (Interface identifiers)                                                         */
/****************************************************************************************/

// {3F4DACA1-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_IMatch, 0x3F4DACA1, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_IMatch
_IID_IMatch:
    dd 0x3F4DACA1
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACB1-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_IMatch2, 0x3F4DACB1, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_IMatch2
_IID_IMatch2:
    dd 0x3F4DACB1
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACA2-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_IMatchCollection, 0x3F4DACA2, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_IMatchCollection
_IID_IMatchCollection:
    dd 0x3F4DACA2
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACB2-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_IMatchCollection2, 0x3F4DACB2, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_IMatchCollection2
_IID_IMatchCollection2:
    dd 0x3F4DACB2
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACA0-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_IRegExp, 0x3F4DACA0, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_IRegExp
_IID_IRegExp:
    dd 0x3F4DACA0
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACB0-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_IRegExp2, 0x3F4DACB0, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_IRegExp2
_IID_IRegExp2:
    dd 0x3F4DACB0
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm

// {3F4DACB3-160D-11D2-A8E9-00104B365C9F}
// DEFINE_GUID(_IID_ISubMatches, 0x3F4DACB3, 0x160D, 0x11D2, 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F);

#asm
global _IID_ISubMatches
_IID_ISubMatches:
    dd 0x3F4DACB3
    dw 0x160D
    dw 0x11D2
    db 0xA8, 0xE9, 0x00, 0x10, 0x4B, 0x36, 0x5C, 0x9F
#endasm


Interfaces:


/****************************************************************************************/
// Library name: VBScript_RegExp_55
// Version: 5.5
// Documentation string: Microsoft VBScript Regular Expressions 5.5
// Path: D:\WINDOWS\system32\vbscript.dll\3
// Library GUID: {3F4DACA7-160D-11D2-A8E9-00104B365C9F}
// Code generated by TypeLib Browser 1.02 for the Aurora Compiler (c) 2006 by JosÃÆ'Ã,© Roca
// Date: 12 oct 2006   Time: 01:01:04
/****************************************************************************************/

/****************************************************************************************/
// Interface name = IRegExp
// IID = {3F4DACA0-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface IRegExp : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Pattern (
    pointer *pPattern                                   // *VT_BSTR <dynamic unicode string> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_Pattern (
    pointer *pPattern                                   // VT_BSTR <dynamic unicode string> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_IgnoreCase (
    word *pIgnoreCase                                   // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_IgnoreCase (
    word pIgnoreCase                                    // VT_BOOL <word> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Global (
    word *pGlobal                                       // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_Global (
    word pGlobal                                        // VT_BOOL <word> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual Execute (
    pointer *sourceString,                              // VT_BSTR <dynamic unicode string> [in]
    IDispatch *ppMatches                                // *VT_DISPATCH <IDispatch> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual Test (
    pointer *sourceString,                              // VT_BSTR <dynamic unicode string> [in]
    word *pMatch                                        // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual Replace (
    pointer *sourceString,                              // VT_BSTR <dynamic unicode string> [in]
    pointer *replaceString,                             // VT_BSTR <dynamic unicode string> [in]
    pointer *pDestString                                // *VT_BSTR <dynamic unicode string> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}

/****************************************************************************************/
// Interface name = IMatch
// IID = {3F4DACA1-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface IMatch : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Value (
    pointer *pValue                                     // *VT_BSTR <dynamic unicode string> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_FirstIndex (
    int *pFirstIndex                                    // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Length (
    int *pLength                                        // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}

/****************************************************************************************/
// Interface name = IMatchCollection
// IID = {3F4DACA2-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface IMatchCollection : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Item (
    int index,                                          // VT_I4 <int> [in]
    IDispatch *ppMatch                                  // *VT_DISPATCH <IDispatch> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Count (
    int *pCount                                         // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get__NewEnum (
    IUnknown *ppEnum                                    // *VT_UNKNOWN <IUnknown> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}

/****************************************************************************************/
// Interface name = IRegExp2
// IID = {3F4DACB0-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface IRegExp2 : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Pattern (
    pointer *pPattern                                   // *VT_BSTR <dynamic unicode string> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_Pattern (
    pointer *pPattern                                   // VT_BSTR <dynamic unicode string> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_IgnoreCase (
    word *pIgnoreCase                                   // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_IgnoreCase (
    word pIgnoreCase                                    // VT_BOOL <word> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Global (
    word *pGlobal                                       // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_Global (
    word pGlobal                                        // VT_BOOL <word> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Multiline (
    word *pMultiline                                    // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual put_Multiline (
    word pMultiline                                     // VT_BOOL <word> [in]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual Execute (
    pointer *sourceString,                              // VT_BSTR <dynamic unicode string> [in]
    IDispatch *ppMatches                                // *VT_DISPATCH <IDispatch> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual Test (
    pointer *sourceString,                              // VT_BSTR <dynamic unicode string> [in]
    word *pMatch                                        // *VT_BOOL <word> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual Replace (
    pointer *sourceString,                              // VT_BSTR <dynamic unicode string> [in]
    VARIANT replaceVar BYVAL,                           // VT_VARIANT <VARIANT> [in]
    pointer *pDestString                                // *VT_BSTR <dynamic unicode string> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}

/****************************************************************************************/
// Interface name = IMatch2
// IID = {3F4DACB1-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface IMatch2 : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Value (
    pointer *pValue                                     // *VT_BSTR <dynamic unicode string> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_FirstIndex (
    int *pFirstIndex                                    // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Length (
    int *pLength                                        // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_SubMatches (
    IDispatch *ppSubMatches                             // *VT_DISPATCH <IDispatch> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}

/****************************************************************************************/
// Interface name = IMatchCollection2
// IID = {3F4DACB2-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface IMatchCollection2 : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Item (
    int index,                                          // VT_I4 <int> [in]
    IDispatch *ppMatch                                  // *VT_DISPATCH <IDispatch> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Count (
    int *pCount                                         // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get__NewEnum (
    IUnknown *ppEnum                                    // *VT_UNKNOWN <IUnknown> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}

/****************************************************************************************/
// Interface name = ISubMatches
// IID = {3F4DACB3-160D-11D2-A8E9-00104B365C9F}
// Attributes = 4304 [0x10D0] [Hidden] [Dual] [Nonextensible] [Dispatchable]
// Inherited interface = IDispatch
/****************************************************************************************/

interface ISubMatches : IDispatch
{
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Item (
    int index,                                          // VT_I4 <int> [in]
    VARIANT *pSubMatch                                  // *VT_VARIANT <VARIANT> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get_Count (
    int *pCount                                         // *VT_I4 <int> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
  declare virtual get__NewEnum (
    IUnknown *ppEnum                                    // *VT_UNKNOWN <IUnknown> [out]
    ), int;                                             // VT_HRESULT <int>
  /*------------------------------------------------------------------------------------*/
}


Regarding date and time functions, they will need to be carefully planned, because a function that returns that today is Thursday is not very useful for a non English-speaking user.

Steven Picard

Thank you, JosÃÆ'Ã,©.  That will be very useful.  It will work at least for most Windows computers since it's pretty much standard.