Code—Per-User Function
Sample Definition User Function Definition Style(nameid, returntype, arglist, shortdescription) $<returntype> $<nameid>($<arglist>) Controls the specific function declaration style. Used in the file glob_func.c for user functions. For a Subroutine named SUBR1,Return type: Integer, Parameter: PRM1 of type Real: Extern User Function Declaration(nameid, returntype, arglist, shortdescription) extern ?<begin> $<CK_memSegment> ?<!=> ?<?>far ?<:> ?<end>$<returntype> $<nameid>($<arglist>); Controls the specific function extern declaration; by default in the file type_def.h Used in the file type_def.h for user functions. For a Subroutine named SUBR1,Return type: Integer, Parameter: PRM1 of type Real,Design-Attribute: CK_memSegment = SEG_1: User Function Opening() ?<begin>$<CK_compilationFlag>?<!=> (none) ?<&&> $<CK_compilationFlag>?<!=> ?<?>#ifdef $<CK_compilationFlag>?<:>?<end>?<begin>$<CK_memSegment>?<!=>?<?>#if defined __HC12__ || defined __HC08__#pragma CODE_SEG $<CK_memSegment>#elif defined(COSMIC12)#pragma section ($<CK_memSegment>) Controls the specific function body definition. It will be added just before the function body begins, by default in the file glob_func.c Used in the file glob_func.c for user functions. For a Subroutine named SUBR1,Return type: Integer, Parameter: PRM1 of type Real,Design-Attribute: CK_compilationFlag = FEATURE_1#ifdef
FEATURE_1
User Function Closure() ?<begin>$<CK_memSegment>?<!=>?<?>#if defined __HC12__ || defined __HC08__#pragma CODE_SEG DEFAULT#elif defined(COSMIC12)#pragma section ($<CK_memSegment>)?<begin>$<CK_compilationFlag>?<!=> (none) ?<&&> $<CK_compilationFlag>?<!=> ?<?>#endif?<:>?<end> Controls the specific function body definition. It will be added just after the function body end, by default in the file glob_func.c Used in the file glob_func.c for user functions. For a Subroutine named SUBR1,Return type: Integer, Parameter: PRM1 of type Real,Design-Attribute: CK_compilationFlag = FEATURE_1 User Function Call Style(nameid, arglist, funcPrefixWrapCode, funcPostfixWrapCode, shortdescription) $<funcPrefixWrapCode>$<nameid>($<arglist>)$<funcPostfixWrapCode> Controls the specific function call style.Formal Parameters:- nameid - The name of the function.- arglist - The code for the arguments, in the function's call.- funcPrefixWrapCode - Function's prefix code (if any).- funcPostfixWrapCode - Function's postfix code (if any).- shortdescription - the function's short description Used in the files where a User-Function is called: <module>.c, glob_func.c etc. For a Subroutine named SUBR1,Actual Parameter: DI_REAL,Design-Attribute: funcPrefixWrapCode = <empty>Design-Attribute: funcPostfixWrapCode = <empty>