home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv4.zip
/
VACPP
/
IBMCPP
/
HELP
/
DDE4TUTE.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-05-31
|
419KB
|
491 lines
ΓòÉΓòÉΓòÉ 1. ΓòÉΓòÉΓòÉ
Select the Forward pushbutton to go to the Introduction.
(C) Copyright International Business Machines Corporation, 1995. All rights reserved.
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Select the Forward pushbutton to go to the Introduction.
(C) Copyright International Business Machines Corporation, 1995. All rights reserved.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Select the Forward pushbutton to go to the Introduction.
(C) Copyright International Business Machines Corporation, 1995. All rights reserved.
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Select the Forward pushbutton to go to the Introduction.
(C) Copyright International Business Machines Corporation, 1995. All rights reserved.
ΓòÉΓòÉΓòÉ 2. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.1.
ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.2. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.3. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
Use the Debugger
In this part, you create a run-time error in the source code, and then use the
VisualAge C++ Debugger, to locate and correct the error.
This part is dependent on the successful completion of the items in
Edit and Compile.
In the Welcome project, open the pop-up menu of oview.cpp (click mouse
button 2 on oview.cpp), and select Edit to open the file in an edit
session.
To simulate a coding error, add double slashes (//) to the line coded as
test1.setString ("Welcome to VisualAge C++"); to comment it out.
Press F3 to close the Editor and click on the Yes pushbutton in the
Editor Warning dialog to save the changed file.
In the Welcome project, select the Smarts button on the project toolbar.
The Build Smarts window that opens indicates that the project will be
built for debugging. (Double-click here for a description of Build
Smarts.)
Click on the OK pushbutton. You are now ready to rebuild the project.
Build Smarts is a quick way to configure project build options so that
you can use VisualAge C++ components that require special build support.
When you select Build Smarts, the build options will be incremented to
include debugging by default (as indicated by the Debugger check box
state).
Open the Project pulldown menu, click on the arrow beside Build to open
the cascade menu, and click on Rebuild all to rebuild the project.
The project build cycle is displayed in the Monitor window and the
project builds successfully.
Run the program to display its output in the Project monitor - click mouse
button 2 on oview.exe. On the pop-up menu, click on the arrow beside Run
to open the cascade menu and select Monitored.
(If oview.exe does not appear in the project parts container, ensure that
* has been entered in the parts filter entry field so that all project
parts are displayed.)
The program runs and its output is sent to the Monitor for viewing. The
expected output
Welcome to VisualAge C++
does not appear in the window.
To start the Debugger, select the Debug button on the Project toolbar, or
open the Project menu and select Debug. (The Program profile warning may
appear. Select the No pushbutton.)
Three windows open:
Debugger Control
Debug Appl
Source.
Since the expression for the variable test1 did not appear in the
program's output, go to the Source view window, open the Monitors pulldown
menu and select Monitor expression.
Type test1 in the Expression entry field of the Monitor expression window
and select the Program Monitor pushbutton.
A Program Monitor window opens. It shows that the testString expression
of test1 is not allocated.
In the Source window, single step through the program by clicking mouse
button 2 to execute each line of the program.
When the cout statement is executed, the allocation for testString in the
Program Monitor window is not the expected text. This indicates that
test1 is not being initialized to Welcome to ... . In the Source window
you can see that test1 has been commented out and therefore cannot be
initialized.
To open an Editor session at a specific point in the source file,
double-click on the background beside a particular statement in the
Debugger Source view. In this case, double-click on the background beside
test1.setString ...
The oview.cpp source file opens in the Editor and the cursor is at the
line designated by the double-click action in the Debugger source view
window.
Remove the double slashes (//) from the line coded with test1....
Press F3 to close the Editor and click on the Yes pushbutton in the
Editor Warning dialog to save the changed file. Also close the Debugger by
pressing F3 in any of the Debugger windows.
The debugger needs to be closed to free the executable (oview.exe) for
the project build cycle.
Rebuild the project by selecting the Build Rebuild all cascade menu item
on the Project pulldown menu. After the project builds successfully, run
the executable (select Run Monitored in the Project pulldown menu) and
you will see that the expected text appears in the project Monitor.
This series of steps introduced you to Build Smarts, the Debugger, and the
Debug Program Monitor. In addition, you invoked the Editor
ΓòÉΓòÉΓòÉ 3.4. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.5. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.6. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.7. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.8. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.9. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.10. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.11. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 3.12. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 4. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 4.1. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 4.2. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 4.3. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 4.4. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 4.5. ΓòÉΓòÉΓòÉ
Welcome to
IBM VisualAge C++
for OS/2
ΓòÉΓòÉΓòÉ 5. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.1. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.2. ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.3. ! ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.4. " ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.5. # ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.6. $ ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.6.1. % ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.6.2. & ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.6.3. ' ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.6.4. ( ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.7. ) ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.8. * ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.9. + ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.10. , ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.11. - ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12. . ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.1. / ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.2. 0 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.3. 1 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.4. 2 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.5. 3 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.6. 4 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.7. 5 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.8. 6 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.9. 7 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.10. 8 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.11. 9 ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.12. : ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ; ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.13. < ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.14. = ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.15. > ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.16. ? ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.17. @ ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.18. A ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.19. B ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.20. C ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.21. D ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.22. E ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.23. F ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.24. G ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.25. H ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.12.26. I ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7. J ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7.1. K ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7.2. L ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7.3. M ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> N ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> O ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7.4. P ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 7.5. Q ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 8. R ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Object files are compiler output files that are linked to comprise an
executable.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A function is defined by the Performance Analyzer as a callable section within
the application. For the Performance Analyzer, procedures and functions are
synonymous.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Hot spots are areas within an application where a disproportionate amount of
time was spent. Plus, this information helps to determine which functions
caused those hot spots.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A time stamp is the actual time at which an event occurred when the
application was being traced.