![]() |
H.5 Using Modules for Further Code Segmentation |
module taxes routine calculate_tax with amount, rate, returning tax_due tax_due = amount * rate end routine end moduleCode uses this module by including it into the main source code using the %include directive. Once included, data and routines within the module are referenced by preceding their names with the module name and a dot.
taxes.calculate_tax with amount cash, rate tax_rate, returning tax_due total_tax
Hide Description
|
|
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |