|
DescriptionThe Function Library Template (FL) formats Function Library submissions, automatically creates a Function Library contents entry, and adds Creative Commons licencing information to you article. The template has five parameters which you can use to include relevant information in the article header. ParametersSynopsis - a brief one or two sentence description of what the function does Rev - the revision or version number. If you do not enter a rev value it defaults to 1.0 Desc - revision description the function is modified YYYY-MM-DD - the date you wrote the function FunctionBody - the actual function code Using the TemplateWhen you want to post a Function Library article begin the article with {{FL Then enter one line for each parameter you want to include. The line should begin with the pipe symbol (|) After the pipe symbol, type the name of the parameter followed by an equal sign followed by the value you want to assign to the parameter. For example: |Synopsis=Count to ten the FunctionBody parameter should be last, immediately followed by your code |FunctionBody= Public Sub sCountTo10() dim icntr as Integer for icntr = 1 to 10 next End Function Finally, type two closing braces to finish the Template call. ExampleIf you type this in your article: {{FL |Synopsis=Count to ten |YYYY-MM-DD=2010-11-09 |FunctionBody= Public Sub sCountTo10() dim icntr as Integer for icntr = 1 to 10 next End Function }} this will be the result:
SynopsisCount to ten CODE ' FL Usage
' http://www.utteraccess.com/wiki/index.php/FL_Usage ' Code courtesy of UtterAccess Wiki ' Licensed under Creative Commons License ' http://creativecommons.org/licenses/by-sa/3.0/ ' ' You are free to use this code in any application, ' provided this notice is left unchanged. ' ' rev date brief descripton ' 1.0 2010-11-09 ' Public Sub sCountTo10() dim icntr as Integer for icntr = 1 to 10 next End Function
Bug with Pipe and <> CharactersPlease note that there is an existing bug in the FL template which effects the Pipe character (|) and the Greater Than and Less Than (<>) characters. The Pipe (|) CharacterThe existence of the pipe character in code entered in the template erroneously indicates the start of the next template parameter. Therefore, while using the FL template, we will see unexpected formatting if the code contains a pipe character. The GT/LT (<>) CharactersAs part of the display process for templates includes rendering to HTML formatting, the Greater Than and Less Than characters within the FL Template will be erroneously displayed as "& g t ;" and "& l t ;" in the procedure. The FixIf your procedure contains either Pipe or GT/LT characters, you can wrap the GT/LT characters in the <nowiki> tags so they will display correctly. For the Pipe character to display correctly with the FL template, you must replace each occurance of the Pipe with the template {{!}}. As an alternative workaround, there is a template called FLFooter, which is to be placed after your complete code entry. This template includes the license information and the category link to the Function Library. Please ensure to include function header comments similar to that used in the standard FL template, as indicated above. Example: </nowiki></br><nowiki> Your Synopsis Here [code] '=========== ' Your function header comments here '=========== ' Your Function Body Here Sub DoStuff() 'do my stuff End Sub [/code] {{FLFooter}}
|
| This page has been accessed 2,449 times. This page was last modified 13:33, 17 April 2011 by Jack Leach. Contributions by Glenn Lloyd Disclaimers |