G
George Potemkin
Guest
> The explicit DO TRANSACTION shouts I would re-word it as: programmer shouts: I guarantee there will be no errors inside the block. PROCEDURE HandleCreated: DO TRANSACTION: CREATE TTObject. ASSIGN TTObject.CreateLine = ILineNumber TTObject.LogDateTime = SUBSTRING(CData, 2, 26) TTObject.ProcessID = TRIM(ENTRY(2, CData, ' ')) TTObject.ThreadID = TRIM(ENTRY(3, CData, ' ')) TTObject.ObjectType = TRIM(SUBSTRING(CData, 89, (INDEX(CData, 'Handle:') - 89))) TTObject.Created = TRUE TTObject.ObjectHandle = INTEGER(ENTRY(1, SUBSTRING(CData, (INDEX(CData, 'Handle:') + 7), 20), ' ')) TTObject.ObjectDetails = CData. END. END PROCEDURE. I don't need to check the logic of the program - will the ASSIGN validate the uniqueness of the temp-table indexes or not. The explicit transaction block means the author of program thought about such things.
Continue reading...
Continue reading...