templates

Templates

The FreeBASIC Extended Library contains preprocessor APIs for the instantiation of templates, which are pieces of generic code in the form of user-defined macros.

One (typical) benefit of templates is that they can minimize code duplication. For example, say that there is some procedure, an algorithm, that iterates through a range of UByte elements in an array:

Tags: 

Subscribe to RSS - templates