Difference between revisions of "Template:Block"

From Sugar Labs
Jump to navigation Jump to search
(Created page with '<big><pre>{{{1}}}</pre></big><noinclude> ==Usage== {{Block|<nowiki>{{Block|code block}}</nowiki>}} Used to display a block of code in an enlarged, monospace typeface within a …')
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<big><pre>{{{1}}}</pre></big><noinclude>
+
<nowiki>{{{1}}}</nowiki><noinclude>
  
 
==Usage==
 
==Usage==
  
{{Block|<nowiki>{{Block|code block}}</nowiki>}}
+
{{Template:Block|<nowiki>{{Block|code block}}</nowiki>}}
  
 
Used to display a block of code in an enlarged, monospace typeface within a gray block like the following:
 
Used to display a block of code in an enlarged, monospace typeface within a gray block like the following:
  
{{Block|
+
{{Block|#!/bin/bash -x<br>
#!/bin/bash -x
+
alskdjf<br>
#
+
alskjf
#  The -x above and the export PS4 (debug prompt) assignment below will help in debugging
+
#
#  long scripts by reporting the line number : script : effective userid : function names
+
#  The -x above and the export PS4 (debug prompt) assignment below will help in debugging
#  to the standard output by through the environment variables.
+
#  long scripts by reporting the line number : script : effective userid : function names
#
+
#  to the standard output by through the environment variables.
 
+
#
export PS4='+(${LINENO}:${BASH_SOURCE}:${EUID}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
+
#
 
+
export PS4='+(${LINENO}:${BASH_SOURCE}:${EUID}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
#  script code to follow.
+
#
 +
#  script code to follow.
 
}}
 
}}
  
 
See also [[:Template:Code]] for {{Code|code lines or words}}.
 
See also [[:Template:Code]] for {{Code|code lines or words}}.
 +
</noinclude>

Latest revision as of 23:30, 18 May 2012

{{{1}}}

Usage

{{{1}}}

Used to display a block of code in an enlarged, monospace typeface within a gray block like the following:

{{{1}}}

See also Template:Code for code lines or words.