re Friday, June 28 timeline 11:00I'm confused about the addTen int function in this example.

I understand that the function addTen adds 10 to myValue which starts at 30

Points of confusion...1. What does PASSED TO USE mean? "After we add 10 to the parameter value THAT WAS PASSED TO USE BY TASK MAIN, ...2. How do we use the Debugger to verify the correct value was returned?3. It would be helpful to me to have the program steps numbered and show the values of variables and parameter as the program is executed.

How would I run this program to see the results?

Sat Jul 06, 2013 6:01 pm

Palione

Rookie

Joined: Sat Jun 15, 2013 7:00 amPosts: 12

Re: Return command

I just found the tutorial on Debugging Techniques which answered all my questions about how return works and also how to step thru the program.

Hi Palione,Glad you answered most of your questions. Not sure if you figured out (1), so here's some explanation:

Functions have parameters (also called arguments) that are used to supply different values to the function from where the function was called. If a value was used as one of a function's parameters, we say that value "was passed" to the function. So "the parameter value that was passed to use by task main" means the value that task main supplied to the function when it called it. You might be getting caught up on the wording, so an equivalent phrase would be "the parameter value that task main passed for the function to use" or "the parameter value that task main passed to the function."

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum