Junior schrieb:
this code was just one example, I have of putting all the code for ask this?

Em 28-06-2013 20:52, John Meyer escreveu:
pray tell what does using a production machine have to do with testing a trivial section of code?
Junior wrote:
because I use a production machine
[...]

For your simple case the provided code is sufficient.

What does "production machine" mean to you? Are you not allowed to write and run your own programs on that machine? If so, you can ask your boss (daddy, administrator...) to create an restricted sandbox account for you, where you can play around with Lazarus without a risk of damage to the system.

If you are allowed to start a program from the Lazarus IDE, you can test its behaviour without modifications to the code. Put an breakpoint somewhere before the "exit" in the try block, and start the program. When that breakpoint is reached, you can single-step through the code (F7) to see which statements are executed in sequence. Without an try-finally block the next executed statement is the subroutine "end;", but from "exit" in the try block, execution proceeds at the code in the "finally" block.

Structured exception handling (SEH) and the use of try-except and try-finally blocks is not easy to understand. Feel free to ask more questions :-)

BTW, look how other people reply to a message. Snip from your reply whatever must not be read again, and insert your comments or questions *after* each related part of the message.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to