Sheerpower Logo H.4  Program Segmentation using Include Directives
When your code base gets really large, segmenting it into smaller chunks of code is a big help for code maintenance. The %include directive is provided for this purpose. In this example we have a file called safe_common.spinc that contains the following code:
full_name$ = 'Sally Sue' tax_rate = 6.5 routine do_it print 'Doing the routine called '; _routine end routine
Here is the example of using the include file.
%include '@..\safe\safe_common' print 'The full name is: '; full_name$ do_it
Very large business applications can easily contain hundreds of thousands of lines of code and are greatly simplified by using many include directives. Typically each include file contains all of the variables and routines needed to perform some specific subtask.
Hide Description

    

       


      

Enter or modify the code below, and then click on RUN

Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use.
Wide screen