Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 5th, 2008, 1:35 AM   #1
secrecy230
Newbie
 
Join Date: May 2005
Posts: 10
Rep Power: 0 secrecy230 is on a distinguished road
Implicit returns

Hi all,
I have an assignment to do and as specification it said:
Your parser should determine the number of returns per method and the return type for each method in the class file. These should be printed in a table. Be sure to count implicit returns.

My question are:
What is implicit return ?
Can you give me an example?
secrecy230 is offline   Reply With Quote
Old May 5th, 2008, 1:41 AM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 404
Rep Power: 3 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
Re: Implicit returns

I am not 100% sure but here is what I think it is:

void foo()
{
  doSomething()
}

int bar(int a)
{
 return a *a
}

int main()
{
  foo();
  bar(2);
  return 0;
}
In the above example I think it could be said that foo() has an implicit return. After execution of doSomething() completes foo() "returns" to main and bar() is called. Hopefully this helps.
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with assignment code returns no answer backstabber C++ 9 Dec 21st, 2006 7:46 AM
GCC - Warning: implicit declaration of function darthsabbath C 5 Jul 6th, 2006 12:52 PM
Stash returns... Malloc problem? Soulstorm C++ 18 May 27th, 2006 2:09 AM
Implicit class converions aznluvsmc C++ 1 Oct 10th, 2005 5:04 AM
Function that returns occurances of substring in string. conbrio C 7 Jul 1st, 2005 6:51 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:30 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC