Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Jul 21st, 2005, 8:00 AM   #11
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

So we are tripping up over "use it" and "call it". When one function calls another function then it becomes "use it". That makes Python a lot clearer to a beginner like me!

I tested it, and it is okay.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jul 21st, 2005, 11:16 AM   #12
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
When one function calls another function then it becomes "use it". That makes Python a lot clearer to a beginner like me!
The provided sample should have reinforced my thoughts, as the correct words failed me. I should think it made things clearer to Minion, as he wasn't fixing something that wasn't broken.
Cerulean is offline   Reply With Quote
Old Jul 22nd, 2005, 10:51 AM   #13
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Talking

Sorry,

I fixed something that wasn't broken. My mistake!

By the time main() is called everything is referenced properly. I agree, globals are a poor choice. Maybe they have a place in short, quick and dirty code.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jul 22nd, 2005, 11:16 AM   #14
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Similar confusion in the JS forum a while back. Referenced and invoked are two different things. Let me also cast my vote with these guys. There are reasons to use globals; they're thin on the ground. Try to avoid them if possible.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei 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




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

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