Top  Previous  Next


The QMMatchfield() function matches a character string against a pattern template and extracts the part corresponding to a specified pattern component. It is analogous to the QMBasic MATCHFIELD() function.


The function arguments are:


Srcis the string to be processed.


Patternis the pattern template to be used.


Componentis the pattern template component number for which the corresponding part of Src  is to be returned.



The QMMatchfield() function matches Src against the Pattern template as described for the QMMatch() function. If the string matches, the portion corresponding to the specified Component is returned. If the string does not match the pattern, a null string is returned.


The examples below return the alphabetic prefix of a value stored in PartCode if it is formed from between two and four letters followed three digits.


This function is evaluated on the client system and does not require a server connection to be open.







hmtoggle_plus1QMBasic Class Module