Normal Topic Subroutines - need some clarification (Read 996 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Subroutines - need some clarification
Aug 9th, 2006 at 5:21pm
Print Post Print Post  
Page 69 of the Programming Guide discusses Subroutines.  I'm a bit puzzled by this statement:
Quote:
User-defined subroutines and functions must occur in the program ahead of the programming statements that call them.


What does "ahead" mean in this context?  TIA!
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Subroutines - need some clarification
Reply #1 - Aug 9th, 2006 at 5:48pm
Print Post Print Post  
It means that they have to be declared(written), above the code that calls them.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Subroutines - need some clarification
Reply #2 - Aug 9th, 2006 at 5:58pm
Print Post Print Post  
Would putting it in Global Code of the form satisfy that requirement?
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Subroutines - need some clarification
Reply #3 - Aug 9th, 2006 at 6:00pm
Print Post Print Post  
Yes. As Global Code is compiled first, subroutines declared in that section can be called from the other events.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Subroutines - need some clarification
Reply #4 - Aug 9th, 2006 at 6:13pm
Print Post Print Post  
Thank you.  Speaking of compiling, what is the best way (in general terms) to decrease the compile time when my form is opening?
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Subroutines - need some clarification
Reply #5 - Aug 9th, 2006 at 6:18pm
Print Post Print Post  
Simplify your code. If you have the same code over and over again turn it into a function or subroutine.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged