|
The QMDel() function deletes a field, value or subvalue from a dynamic array. It is analogous to the QMBasic DELETE() function.
The function arguments are:
| Src | is the dynamic array to be processed |
| Fno | is the number of the field to be deleted. If less than 1, 1 is assumed |
| Vno | is the number of the value to be deleted. If less than 1, the entire field is deleted. |
| Svno | is the number of the subvalue to be deleted. If less than 1, the entire value is deleted. |
The QMDel() function returns a new dynamic array with the given field, value or subvalue deleted. If the required item is not found, the original string is returned unchanged.
The examples below return a copy of the dynamic array Rec with field 1, value Pos removed.
char * QMDel(char * Src, int Fno, int Vno, int Svno)
NewRec = QMDel(Rec, 1, Pos, 0);
Note that the function returns a pointer to a newly allocated memory area which must be released using QMFree() when no longer needed. A statement such as
Rec = QMDel(Rec, 1, Pos, 0);
will overwrite the Rec pointer without releasing the previously allocated memory.
|
QMDel(ByVal Src as String, ByVal Fno as Integer, ByVal Vno as Integer, ByVal Svno as Integer) as String
NewRec = QMDel(Rec, 1, Pos, 0)
|
This function is not supported by the QMClient class module as it is a QMBasic function.
|
String Del(String Src, int Fno, int Vno, int Svno)
NewRec = qm.Del(Rec, 1, Pos, 0);
|
Del(Src, Fno, Vno, Svno)
NewRec = qm.Del(Rec, 1, Pos, 0)
|
|