Other Helpful Hints
Here are just a few final things to note:
-
When the cursor is in the *shell* buffer, there is a menu titled
"Signals". This menu contains an option "Send KILL" that
you can use to stop the exection of your program if it is executing an
infinite
loop. Consider the Euclid.cpp program and imagine what
would happen if you replaced the recursive call in the Greatest_Common_Divisor
function,
i.e., Greatest_Common_Divisor (k mod j, j), by the call Greatest_Common_Divisor
(j, k). The program would keep calling the function with the same
values (say 5 and 10), and the value of j would never become zero,
and hence the program would never terminate. In such a situation, you can
select the "Send KILL" option from the "Signals" menu to
terminate the program.
-
Under some circumstances your program might do something that causes an
error which is not detected and reported immediately with a violated assertion
message. For example, what actually happens with the error above is that
the program eventually runs out of memory for keeping track of the recursive
calls, and terminates with what is called a segmentation fault. (This can happen for a variety of other reasons, too,
but these are rarely encountered in Resolve/C++ programs.)
This concludes the Resolve/C++ tutorial. For more information regarding
Resolve/C++, check out the Resolve/C++ Code
Examples and the Resolve/C++
Component Catalog. Another very helpful resource is the Resolve/C++
FAQ (Frequently Asked Questions) page. It is an excellent starting
place to find answers to your Resolve/C++ questions, but it is organized
in a rather strange way (i.e., it is effectively not organized :-) so your
best bet is simply to peruse it before you need it. Think of it
as giving you some hints for things to watch out for. On first reading
a lot of things might not make sense, but if you revisit the FAQ occasionally
you'll probably find it helpful.
Last modified: Fri Dec 15 16:42:58 EST 2006