Programming Forums
User Name Password Register
 

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

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Aug 5th, 2004, 6:48 PM   #1
G.I.Josh
Programmer
 
G.I.Josh's Avatar
 
Join Date: Aug 2004
Location: Eastern U.S
Posts: 51
Rep Power: 5 G.I.Josh is on a distinguished road
Send a message via AIM to G.I.Josh
I'm having a difficult time grasping the concept of returning values in functions. Here is what I think I know. If you have a function like
def welcome_message(name):
  print name
welcome_message(G.I.Josh)
It will store the value G.I.Josh in a variable called name. Now, if I added return G.I.Josh, what exactly would happen? Also, if I needed to get more then one variable from outside of the function into the function, how could I do that? And lastly. How can I keep variables I manipulate inside the function from going back to their orriginal value once the function is over? Thanks.
__________________
http://exponentialab.blogspot.com/ - w00t, I've started a blog!
G.I.Josh is offline   Reply With Quote
 

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:21 PM.

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