| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Template Symbols > Built-in Symbols >====== Symbols Dependent on %Procedure {{c6h0068.jpg|C6H0068.jpg}} ====== | [[symbols dependent on module.htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[window control symbols.htm|{{btn_next_n.gif|Next page}}]] | | || The following symbols are in alphabetical order: | %ActiveTemplate | The names of all templates used in the procedure. Multi-valued. Dependent on %Procedure.The names are in the format "MyTemplateName(MyChainName)" [with the double quotes], where "MyChainName" is the name used in the #TEMPLATE that contains the "MyTemplateName" template. | | %ActiveTemplateInstance | The instance numbers of all templates used in the procedure. Multi-valued. Dependent on %ActiveTemplate. | | %ActiveTemplateInstanceDescription | The description of the template. Dependent on %ActiveTemplateInstance. | | | | | %ActiveTemplateOwnerInstance | The instance number of the extension template which auto-populated the current extension template into a procedure through use of the parameter to the APPLICATION attribute on a #EXTENSION statement. Dependent on %ActiveTemplateInstance. | | %ActiveTemplateParentInstance | The instance number of the control template's parent control template. This is the control template that it is "attached" to. Dependent on %ActiveTemplateInstance. | | %ActiveTemplatePrimaryInstance | The instance number of the control template's primary control template. This is the first control template in a succession of multiple related control templates. Dependent on %ActiveTemplateInstance. | | | | | %ActiveTemplateType | The type of all templates used in the procedure. Multi-valued. Dependent on %ActiveTemplate. Returns CODE, EXTENSION or CONTROL. | | %LocalData | The labels of all local variable declarations made through the Data button on the Procedure Properties window. Multi-valued. Dependent on %Procedure. | | %LocalDataID | Same as %LocalData | | %LocalDataFull | Returns full identifiers of variables or fields. For fields inside compound structures with prefixes %LocalDataFull returns prefixed field identifiers. | | %LocalDataStatement | The variable's declaration statement (data type and all attributes). Dependent on %LocalData. | | %LocalDataDescription | A short description of the field. Dependent on %LocalData. | | %LocalDataHeader | The field's default report column header. Dependent on %LocalData. | | %LocalDataPicture | Default display picture. Dependent on %LocalData. | | %LocalDataJustType | Contains L, R, C, or D for the field's justification. Dependent on %LocalData. | | %LocalDataJustIndent | The justification offset amount. Dependent on %LocalData. | | %LocalDataFormatWidth | The default width for the field's ENTRY control. Dependent on %LocalData. | | %LocalDataUserOptions | A string containing the entries the user made in the User Options text box on the Options tab for the local variable. Dependent on %LocalData. | | %Procedure | The names of all procedures in the application. Multi-valued. | | %ProcedureToDo | Contains 1 if the procedure is "ToDo." Dependent on %Procedure. | | %ProcedureType | Contains PROCEDURE or FUNCTION. Dependent on %Procedure. | | %ProcedureReturnType | The data type returned, if the procedure is a FUNCTION. Dependent on %Procedure. | | %ProcedureDateCreated | The procedure creation date (a Clarion standard date). Dependent on %Procedure. | | %ProcedureDateChanged | The date the procedure was last changed (a Clarion standard date). Dependent on %Procedure. | | %ProcedureTimeCreated | The time the procedure was created (a Clarion standard time). Dependent on %Procedure. | | %ProcedureTimeChanged | The time the procedure was last changed (a Clarion standard time). Dependent on %Procedure. | | %ProcedureReadOnly | Contains 1 if the procedure is read only. Dependent on %Procedure. | | %ProcedureIsGlobal | Contains 1 if the procedure is to be declared in the global MAP. Dependent on %Procedure. | | %Prototype | The procedure's prototype for the MAP structure. Dependent on %Procedure. | | %ProcedureTemplate | The name of the Procedure Template used to generate the procedure. Dependent on %Procedure. | | %ProcedureDescription | A short description of the procedure. Dependent on %Procedure. | | %ProcedureCategory | The procedure's category. Dependent on %Procedure. | | %ProcedureExported | Contains 1 if the procedure is in a DLL and is callable from outside the DLL. Dependent on %Procedure. | | %ProcedureLongDescription | A long description of the procedure. Dependent on %Procedure. | | %ProcedureLanguage | The target language the procedure template generates. Dependent on %Procedure. | | %ProcedureCalled | The names of all procedures listed by the Procedures button on the Procedure Properties window. Multi-valued. Dependent on %Procedure. | | | | The March 25, 2013 Clarion Sharp blog documented new [[https://clarionsharp.com/blog/changes-to-template-built-in-symbols-in-c9/|Clarion 9 Template Symbols]] for the Procedure Parameters. As part of the ongoing work and evolution of the Win32 AppGen, and based on numerous requests the following template symbols are now built-in (as opposed to defined at the template level): **%Parameters** – single, dependent from %Procedure The full list of a procedure’s formal parameters separated by commas and enclosed in parentheses unless empty %ProcedureParameterName – multi, dependent from %Procedure The list of names of all formal parameters as entered in %Parameters symbols; if missing then the name of that parameter as in %Prototype symbol is returned; if that is missing too, an AppGen generated name is returned **The Blog was incorrect stating %ProcedureParameterName was Multi, the correct symbol is %ProcedureParameters.** **%ProcedureParameters** (correction) – multi, dependent from %Procedure The list of names of all formal parameters as entered in %Parameters symbols; if missing then the name of that parameter as in %Prototype symbol is returned; if that is missing too, an AppGen generated name is returned **%ProcedureParameterName** – single multi, dependent from %ProcedureParameters Names of parameter as entered in %Parameters symbols; if missing then the name of that parameter as in %Prototype symbol is returned; if that is missing too, an AppGen generated name is returned **%ProcedureParameterOrigName** – single, dependent from %ProcedureParameters The name of the parameter as entered in the %Prototype symbol **%ProcedureParameterType** – single, dependent from %ProcedureParameters The type of the parameter as entered in the %Prototype symbol (without the CONST keyword and square brackets for array types) **%ProcedureParameterDefault** – single, dependent from %ProcedureParameters The default value of parameters as entered in the %Prototype symbol **%ProcedureParameterOmitted** – single, dependent from %ProcedureParameters Returns %True if the parameter is declared as omittable in the %Prototype symbol **%ProcedureParameterByReference** – single, dependent from %ProcedureParameters Returns %True if the parameter’s type is declared with leading * in the %Prototype symbol **%ProcedureParameterConstant** – single, dependent from %ProcedureParameters Returns %True if the parameter’s type is declared with the CONST keyword in the %Prototype symbol And a new built-in symbol has been introduced into C9: **%ProcedureParameterDIMs** – single, dependent from %ProcedureParameters Returns the number of dimensions if the parameter’s type is declared as an array in the %Prototype symbol (1 for [] , 2 for [,] , etc.) The updated Application Generator reads TXA files produced by earlier Clarion versions. TXA files produced by the C9 AppGen can’t be read by previous versions. ---- A template is [[https://github.com/CarlTBarnes/Template-Parameter-Symbols|available on GitHub]] to enumerate these new symbols as comments to see the exact values returned. !------------Extension: ParamSymbolsTestC9 from ParamSymbolsTestC9tpl ------------ !--------------------------------------------------------------------------------- ! %Prototype: (, BYTE P2_Def=2, , *BYTE P4_Addr, *LONG[] A1, *SHORT[,] A2, ? U1, *? U2) ! %Parameters: (,BYTE P2_Def,,*BYTE P4_Addr,*LONG[] A1,*SHORT[,] A2,? U1,*? U2) !---------------------------------------------------------------------------------- ! #FOR(%ProcedureParameters) is MULTI dependent on %Procedure !---------------------------------------------------------------------------------- ! Parameter # 1 - BYTE P1 ! %ProcedureParameters = P1 ! Name also, was hoping was entire parameter ! %ProcedureParameterName = P1 ! Name from Parameters ! %ProcedureParameterOrigName = P1 ! Name from Protoype ! %ProcedureParameterType = BYTE ! TYPE w/o CONST * [] decoration & UPPER ! %ProcedureParameterDefault = ! Value if TYPE NAME=Default Value ! %ProcedureParameterOmitted = 1 ! %True (1) if ! %ProcedureParameterByReference = 1 ! %True (1) if *TYPE (by Address), no * then %False ! %ProcedureParameterConstant = 1 ! %True (1) if CONST ! %ProcedureParameterDIMs = 1 ! TYPE[] Array 1=[] 2=[,] 3=[,,] ... 0=Not[] !---------------------------------------------------------------------------------- ! Parameter # 2 - BYTE P2_Def ! %ProcedureParameters = P2_Def ! Name also, was hoping was entire parameter ! %ProcedureParameterName = P2_Def ! Name from Parameters ! %ProcedureParameterOrigName = P2_Def ! Name from Protoype ! %ProcedureParameterType = BYTE ! TYPE w/o CONST * [] decoration & UPPER ! %ProcedureParameterDefault = 2 ! Value if TYPE NAME=Default Value ! %ProcedureParameterOmitted = ! %True (1) if ! %ProcedureParameterByReference = ! %True (1) if *TYPE (by Address), no * then %False ! %ProcedureParameterConstant = ! %True (1) if CONST ! %ProcedureParameterDIMs = 0 ! TYPE[] Array 1=[] 2=[,] 3=[,,] ... 0=Not[] !----------------------------------------------------------------------------------