Several things I consider when deciding whether to create a 2nd script
or to include steps in the current script:
1) Is there even a remote possibility I'll use the same set of steps
again in another context?
2) For future mods or repairs, would it make it easier for the
programmer if a chunk of scripts were placed in their own script?
3) Most importantly, can I write the script using script parameters so
that it's reusable?
I've seen examples of scripts that seem to use sub-scripts for no
apparent reason; in my opinion, that makes future edits more difficult
rather than less.
On the other hand, if you can reuse the same script throughout your
solution, you'll have tighter code, less chance of error, and easier
expandability.
One of the first things I would recommend to anyone wanting to write
more reusable code would be to consider a multiple-parameter function
or set of functions. It allows your code to be more modular, less hard-
coded, and as a result much more portable.
Bob Patin
Longterm Solutions LLC
P.O. Box 3408
Brentwood, TN 37024
[hidden email]
615-333-6858
http://www.longtermsolutions.comiChat: bobpatin
Twitter: bobpatin
FileMaker 10 Certified Developer
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting
On Oct 18, 2009, at 3:29 PM, Mark Rubenstein wrote:
>> If I may, I need a point of clarification. When should I use the
>> SUB-SCRIPT
>> parameter within the PERFORM SCRIPT function? (The on-board help is
>> all but
>> useless.) A simple example of its usage (one with and one without)
>> would be
>> most appreciated. TIA.
>
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au