Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #36  
Old 10th January 2014, 09:11 PM
blackdog1 blackdog1 is offline
Member
 
Join Date: Aug 2013
Posts: 177
Default

Quote:
Originally Posted by Martinw
Curious about not copying code - why reinvent the wheel?
lets say you have a pageful of code (a function) that will also do a job in an other part of your app. but you have to change a few variable names it will call on.
It's tempting of course and you ask what could go wrong?

well for starters some of those vars will be global not private, so if you miss changing just one of of them the function will still work because it doesn't 'know' which global vars are you referencing the old ones or the new ones.

there is more to it than that, it need not be a function it could be a directory address or whatever or worse case a pointer address that happens to be valid, but believe me it can drive you nuts trying to find a bug like that because everything seems to work ok but gives you the wrong results.

It probably won't matter as much in a small project.
Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 10:38 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655