Template:Incode: Difference between revisions

From BathAfrica Documentation
Jump to navigation Jump to search
sybma>Admin
m 1 revision imported
m 1 revision imported: Make tested BathAfrica compatibility revisions current
 
(4 intermediate revisions by the same user not shown)
Line 48: Line 48:
[[Category:Template:Text Format]]
[[Category:Template:Text Format]]
</noinclude>
</noinclude>
<noinclude>
----
Migrated from [https://wiki.sybma.com/index.php?title=Template:Incode SiteMasterDoc]. Original revision history and imported contributor names are retained. See [[BathAfrica:Template migration]] for compatibility changes and unresolved image dependencies. Legacy examples do not establish current BathAfrica product capabilities.
</noinclude>

Latest revision as of 07:18, 29 October 2026

{{{1}}}


Use this template when you want to display in-line code.

You can build a line with {{incode|simulationMethod->simulate(data)}}

Results:

You can build a line with simulationMethod->simulate(data)


It should be used for short pieces of code or variables, not for multiple lines. For multiple lines use Template:Code, {{code|code=multiple lines}}

.

Note

  • To display an = (equals) sign use the {{:=}} template.
    Example: typing {{incode| x {{:=}} y}} produces: x = y


  • To display certain special characters in this template you must enclose them in "nowiki" tags: <nowiki></nowiki>

.

Special characters include:
  • |
piping character.
  • {
opening curly bracket or brace.
  • }
closing curly bracket or brace.


Example without "nowiki" tags:

{{Incode|okbox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)}}

Result:

okbox.setStandardButtons(QtGui.QDialogButtonBox.Cancel



Example with "nowiki" tags:

{{Incode|okbox.setStandardButtons(QtGui.QDialogButtonBox.Cancel <nowiki>|</nowiki> QtGui.QDialogButtonBox.Ok)}}

Result:

okbox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)




Migrated from SiteMasterDoc. Original revision history and imported contributor names are retained. See BathAfrica:Template migration for compatibility changes and unresolved image dependencies. Legacy examples do not establish current BathAfrica product capabilities.