Template:ExampleCode: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{#tag: |
{{#tag:source|{{{example|{{{1}}} }}} }}<noinclude> |
||
---- |
---- |
Revision as of 14:49, 20 January 2017
{{{1}}}
Use this template when you want to display code, for example :
{{ExampleCode|example= import FreeCAD, Draft Draft.makeLine(FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,0,0)) }}
REMARK:
- This template {{ExampleCode|example=xx}} is different and is created for differentiate the code example and the principal code of the macro for use with the addons_installer.FCMacro for download the first read code
- Since a content that includes an equals sign (=) is interpreted as a variable, you must specify the code parameter explicitly to avoid issues (as in the above example)
- If the macro code content the characters : "|" (Vertical bar) or "{ }" (Closing brace or Opening brace) not use this template (the macro code is dislocated an erroneous), use the HTML code <pre> ... </pre>