Normal Topic Subroutine or individual programs (Read 697 times)
CapitalG
Full Member
Members
***
Offline



Posts: 143
Location: Phoenix, Arizona
Joined: Mar 4th, 2003
Subroutine or individual programs
Aug 4th, 2004 at 5:00pm
Print Post Print Post  
First, know that I am do not know much about programming.  I have a database that has about 25 different Phone, Fax, and Cell elements.  I am looking at the programming samples and see how to format these telephone numbers into the standard (XXX) XXX-XXXX format.  Should I enter this programming in 25 different times individually, or should I do a subroutine in the global code section and put a simple subroutine call into each element?  Or am I so lost that none of this makes sense?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Subroutine or individual programs
Reply #1 - Aug 4th, 2004 at 5:16pm
Print Post Print Post  
Go with a function in the global code area. It will be central so much easier to maintain and change. It will also compile (and maybe - run) faster.

Remember to make it flexilble enough to handle extensions and international numbers.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
CapitalG
Full Member
Members
***
Offline



Posts: 143
Location: Phoenix, Arizona
Joined: Mar 4th, 2003
Re: Subroutine or individual programs
Reply #2 - Aug 4th, 2004 at 5:17pm
Print Post Print Post  
Thanks!
  
Back to top
 
IP Logged