User Tools

Site Tools


what_templates_are.htm
Navigation:  Templates > Template Language Reference > Introduction >====== What Templates Are C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

A template is a complete set of instructions, both Template and “target” language statements, which the Application Generator uses to process the programmer's input for application customizations then generate “target” language (usually, but not limited to, Clarion language) source code.

Clarion's templates are completely reusable. They generate only the exact code required for each specific instance of its use; they do not inherit unused methods. The templates are also polymorphic, since the programmer specifies the features and functions of each template that are required for the procedure. This means one template can generate different functionality based upon the programmer's desires.

Some of the most important aspects of template functionality supported by the Template Language include:

·Support for controls (#PROMPT) that gather input from the developer, storing that input in user-defined template variables (symbols).

·Pre-defined template variables (Built-in Symbols) containing information from the data dictionary and Clarion for Windows' application development environment.

·Specialized #PROMPT entry types, which give the programmer a list of appropriate choices for such things as data file or key selection.

·Unconditional and conditional control structures (#FOR, #LOOP, #IF, #CASE) which branch source generation execution based on an expression or the contents of a symbol (variable). This allows the Application Generator to generate only the exact source code needed to produce the programmer's desired functionality in their application.

·Statements (#EMBED) that define specific points where the developer can insert (embed) or not insert their own source code to further customize their application.

·Support for code templates (#CODE), control templates (#CONTROL), and extension templates (#EXTENSION) that add their specific (extended) functionality to any procedure template. This makes any procedure type polymorphic, in that, the procedure can include functionality normally performed by other types of procedures.

Template code is contained in one or more ASCII files (*.TPL or *.TPW) which the Appli

what_templates_are.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1