Visual C++
#include <windows.h>
#include <stdio.h>
#include "pure.h"
...
void main()
{
int x;
InputFunctionA();
QuantifyClearData();
ComputationFunctionB();
QuantifySaveData();
//The preceding function takes a snapshot of the performance data
//collected for ComputationFunctionB. The data collected for
//the startup phase of the program was discarded before
//ComputationFunctionB was called.
QuantifyClearData();
ComputationFunctionC();
QuantifySaveData();
//The preceding function takes a snapshot of the performance data
//collected for ComputationFunctionC.
QuantifyDisableRecordingData();
//The preceding function disables recording of
//performance data for the rest of the run.
OutputFunctionD();
}
Visual Basic
Dim status As Integer
...
If QuantifyIsRunning() = 1 Then
status = QuantifySaveData()
Text1.Text = Text1.Text & "QuantifySaveData = " & retCode & vbCrLf
If status = 1 Then
MsgBox "Quantify saved the data"
End If
status = QuantifyClearData()
If status = 1 Then
MsgBox "Quantify cleared recorded data"
End If
status = QuantifyDisableRecordingData()
If status = 1 Then
MsgBox " Recording is disabled"
End If
End If
(C) Copyright IBM Corporation 1993, 2009.