Using Trace Messages About Trace Messaging ──────────────────────────────────────────────────────────────────────────────
The TRACE command allows you to send a message to the Assert/Trace window without the need for execution of the program to halt.
This could come in handy when you were testing a piece of code and you wanted to know just where your program currently was in it's run.
A simple line such as:
TRACE MESSAGE "Hey Dad, I made it to the semaphore lock routine"
would send a message to the Assert/Trace window, without the need for interrupting the execution of the program.
In many ways, TRACE is very similar to ASSERT, the only difference being that TRACE does not halt execution of the program.
A Trace command could be used by you in cases where something has failed that would not be obvious. For example let us say that you are looking for a record in a table and the seek fails, you could use a TRACE command to log the fact that the trace failed.
The following example would log a message to the Assert/Trace window saying that the record could not be found:
( cTableName )->( dbSeek( cExp ) )
TRACE (cTableName)->(FOUND()) ; MESSAGE "Failed to find record using: ", cExp," in: ", cTableName